From owner-dev-commits-src-main@freebsd.org Mon Jun 7 05:36:15 2021 Return-Path: Delivered-To: dev-commits-src-main@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 1A82F647C76; Mon, 7 Jun 2021 05:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fz2Cz0Dkjz3hFm; Mon, 7 Jun 2021 05:36: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 E4DA211883; Mon, 7 Jun 2021 05:36:14 +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 1575aElj058291; Mon, 7 Jun 2021 05:36:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1575aEtv058290; Mon, 7 Jun 2021 05:36:14 GMT (envelope-from git) Date: Mon, 7 Jun 2021 05:36:14 GMT Message-Id: <202106070536.1575aEtv058290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: b3b695604de3 - main - stress2: Added a few syzkaller reproducers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3b695604de3304f4f71506dccb70a1d06f44026 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 05:36:15 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=b3b695604de3304f4f71506dccb70a1d06f44026 commit b3b695604de3304f4f71506dccb70a1d06f44026 Author: Peter Holm AuthorDate: 2021-06-07 05:33:32 +0000 Commit: Peter Holm CommitDate: 2021-06-07 05:33:32 +0000 stress2: Added a few syzkaller reproducers --- tools/test/stress2/misc/syzkaller39.sh | 244 ++++++++++++++++++++++++++++ tools/test/stress2/misc/syzkaller40.sh | 85 ++++++++++ tools/test/stress2/misc/syzkaller41.sh | 284 +++++++++++++++++++++++++++++++++ 3 files changed, 613 insertions(+) diff --git a/tools/test/stress2/misc/syzkaller39.sh b/tools/test/stress2/misc/syzkaller39.sh new file mode 100755 index 000000000000..e19f19d2c751 --- /dev/null +++ b/tools/test/stress2/misc/syzkaller39.sh @@ -0,0 +1,244 @@ +#!/bin/sh + +# panic: ktrace_enter: flag set +# cpuid = 0 +# time = 1621577415 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01c0025670 +# vpanic() at vpanic+0x181/frame 0xfffffe01c00256c0 +# panic() at panic+0x43/frame 0xfffffe01c0025720 +# ktrnamei() at ktrnamei+0xdb/frame 0xfffffe01c0025750 +# namei() at namei+0x805/frame 0xfffffe01c0025800 +# vn_open_cred() at vn_open_cred+0x497/frame 0xfffffe01c0025970 +# sys_ktrace() at sys_ktrace+0x1a0/frame 0xfffffe01c0025ac0 +# amd64_syscall() at amd64_syscall+0x147/frame 0xfffffe01c0025bf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01c0025bf0 +# --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8003b054a, rsp = 0x7fffdfffdf68, rbp = 0x7fffdfffdf90 --- +# KDB: enter: panic +# [ thread pid 80729 tid 101297 ] +# Stopped at kdb_enter+0x37: movq $0,0x1281d9e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #0 main-n246739-fc0dc94029d-dirty: Wed May 19 05:54:45 CEST 2021 +# pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO +# db> + +[ `uname -p` != "amd64" ] && exit 0 +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +cat > /tmp/syzkaller39.c < +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; +} + +static void thread_start(void* (*fn)(void*), void* arg) +{ + pthread_t th; + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, 128 << 10); + int i = 0; + for (; i < 100; i++) { + if (pthread_create(&th, &attr, fn, arg) == 0) { + pthread_attr_destroy(&attr); + return; + } + if (errno == EAGAIN) { + usleep(50); + continue; + } + break; + } + exit(1); +} + +typedef struct { + pthread_mutex_t mu; + pthread_cond_t cv; + int state; +} event_t; + +static void event_init(event_t* ev) +{ + if (pthread_mutex_init(&ev->mu, 0)) + exit(1); + if (pthread_cond_init(&ev->cv, 0)) + exit(1); + ev->state = 0; +} + +static void event_reset(event_t* ev) +{ + ev->state = 0; +} + +static void event_set(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + if (ev->state) + exit(1); + ev->state = 1; + pthread_mutex_unlock(&ev->mu); + pthread_cond_broadcast(&ev->cv); +} + +static void event_wait(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + while (!ev->state) + pthread_cond_wait(&ev->cv, &ev->mu); + pthread_mutex_unlock(&ev->mu); +} + +static int event_isset(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +static int event_timedwait(event_t* ev, uint64_t timeout) +{ + uint64_t start = current_time_ms(); + uint64_t now = start; + pthread_mutex_lock(&ev->mu); + for (;;) { + if (ev->state) + break; + uint64_t remain = timeout - (now - start); + struct timespec ts; + ts.tv_sec = remain / 1000; + ts.tv_nsec = (remain % 1000) * 1000 * 1000; + pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); + now = current_time_ms(); + if (now - start > timeout) + break; + } + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +struct thread_t { + int created, call; + event_t ready, done; +}; + +static struct thread_t threads[16]; +static void execute_call(int call); +static int running; + +static void* thr(void* arg) +{ + struct thread_t* th = (struct thread_t*)arg; + for (;;) { + event_wait(&th->ready); + event_reset(&th->ready); + execute_call(th->call); + __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); + event_set(&th->done); + } + return 0; +} + +static void loop(void) +{ + int i, call, thread; + int collide = 0; +again: + for (call = 0; call < 3; call++) { + for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); + thread++) { + struct thread_t* th = &threads[thread]; + if (!th->created) { + th->created = 1; + event_init(&th->ready); + event_init(&th->done); + event_set(&th->done); + thread_start(thr, th); + } + if (!event_isset(&th->done)) + continue; + event_reset(&th->done); + th->call = call; + __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); + event_set(&th->ready); + if (collide && (call % 2) == 0) + break; + event_timedwait(&th->done, 50); + break; + } + } + for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) + sleep_ms(1); + if (!collide) { + collide = 1; + goto again; + } +} + +uint64_t r[1] = {0x0}; + +void execute_call(int call) +{ + intptr_t res = 0; + switch (call) { + case 0: + memcpy((void*)0x20000140, "./file0\000", 8); + syscall(SYS_open, 0x20000140ul, 0x200ul, 0ul); + break; + case 1: + res = syscall(SYS_getpid); + if (res != -1) + r[0] = res; + break; + case 2: + memcpy((void*)0x20000040, "./file0\000", 8); + syscall(SYS_ktrace, 0x20000040ul, 0ul, 0x4722db8820f38dbbul, r[0]); + break; + } +} +int main(void) +{ + syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); + loop(); + return 0; +} +EOF +mycc -o /tmp/syzkaller39 -Wall -Wextra -O0 /tmp/syzkaller39.c -lpthread || + exit 1 + +(cd /tmp; timeout 3m ./syzkaller39) + +rm -rf /tmp/syzkaller39 syzkaller39.c /tmp/syzkaller.* +exit 0 diff --git a/tools/test/stress2/misc/syzkaller40.sh b/tools/test/stress2/misc/syzkaller40.sh new file mode 100755 index 000000000000..8c4d3e4ee54e --- /dev/null +++ b/tools/test/stress2/misc/syzkaller40.sh @@ -0,0 +1,85 @@ +#!/bin/sh + +# panic: mtx_lock() of spin mutex (null) @ ../../../kern/sys_socket.c:785 +# cpuid = 7 +# time = 1622878256 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01aaec6880 +# vpanic() at vpanic+0x181/frame 0xfffffe01aaec68d0 +# panic() at panic+0x43/frame 0xfffffe01aaec6930 +# __mtx_lock_flags() at __mtx_lock_flags+0x13c/frame 0xfffffe01aaec6980 +# soo_aio_cancel() at soo_aio_cancel+0x51/frame 0xfffffe01aaec69b0 +# aio_cancel_job() at aio_cancel_job+0x95/frame 0xfffffe01aaec69f0 +# aio_proc_rundown() at aio_proc_rundown+0xcf/frame 0xfffffe01aaec6a40 +# exit1() at exit1+0x36e/frame 0xfffffe01aaec6ab0 +# sys_sys_exit() at sys_sys_exit+0xd/frame 0xfffffe01aaec6ac0 +# amd64_syscall() at amd64_syscall+0x147/frame 0xfffffe01aaec6bf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01aaec6bf0 +# --- syscall (1, FreeBSD ELF64, sys_sys_exit), rip = 0x8003b230a, rsp = 0x7fffffffe528, rbp = 0x7fffffffe540 --- +# KDB: enter: panic +# [ thread pid 3000 tid 100365 ] +# Stopped at kdb_enter+0x37: movq $0,0x127fb8e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #0 main-n247181-1b5bc3a54b6: Sat Jun 5 04:12:19 CEST 2021 +# pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO +# db> + +[ `uname -p` != "amd64" ] && exit 0 +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +cat > /tmp/syzkaller40.c < +#include +#include +#include +#include +#include +#include +#include +#include +#include + +uint64_t r[1] = {0xffffffffffffffff}; + +int main(void) +{ + syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); + intptr_t res = 0; + res = syscall(SYS_socket, 0x1cul, 1ul, 0); + if (res != -1) + r[0] = res; + *(uint32_t*)0x20000200 = r[0]; + *(uint64_t*)0x20000208 = 8; + *(uint64_t*)0x20000210 = 0; + *(uint64_t*)0x20000218 = 0; + *(uint32_t*)0x20000220 = 0x100; + *(uint32_t*)0x20000224 = 9; + *(uint64_t*)0x20000228 = 0x80000000; + *(uint32_t*)0x20000230 = 5; + *(uint32_t*)0x20000234 = 1; + *(uint64_t*)0x20000238 = 6; + *(uint64_t*)0x20000240 = 2; + *(uint64_t*)0x20000248 = 0; + *(uint32_t*)0x20000250 = 1; + *(uint32_t*)0x20000254 = 3; + *(uint64_t*)0x20000258 = 0x109; + *(uint32_t*)0x20000260 = 0; + syscall(SYS_aio_read, 0x20000200ul); + syscall(SYS_listen, r[0], 0x8273); + return 0; +} +EOF +mycc -o /tmp/syzkaller40 -Wall -Wextra -O0 /tmp/syzkaller40.c -lpthread || + exit 1 + +(cd /tmp; timeout 3m ./syzkaller40) + +rm -rf /tmp/syzkaller40 syzkaller40.c /tmp/syzkaller.* +exit 0 diff --git a/tools/test/stress2/misc/syzkaller41.sh b/tools/test/stress2/misc/syzkaller41.sh new file mode 100755 index 000000000000..762f155e33bf --- /dev/null +++ b/tools/test/stress2/misc/syzkaller41.sh @@ -0,0 +1,284 @@ +#!/bin/sh + +# Fatal trap 12: page fault while in kernel mode +# cpuid = 23; apic id = 2b +# fault virtual address = 0x0 +# fault code = supervisor read instruction, page not present +# instruction pointer = 0x20:0x0 +# stack pointer = 0x28:0xfffffe0131d05b78 +# frame pointer = 0x28:0xfffffe0131d05bb0 +# code segment = base 0x0, limit 0xfffff, type 0x1b +# = DPL 0, pres 1, long 1, def32 0, gran 1 +# processor eflags = interrupt enabled, resume, IOPL = 0 +# current process = 35 (soaiod1) +# trap number = 12 +# panic: page fault +# cpuid = 23 +# time = 1622994049 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0131d05820 +# vpanic() at vpanic+0x181/frame 0xfffffe0131d05870 +# panic() at panic+0x43/frame 0xfffffe0131d058d0 +# trap_fatal() at trap_fatal+0x387/frame 0xfffffe0131d05930 +# trap_pfault() at trap_pfault+0x97/frame 0xfffffe0131d05990 +# trap() at trap+0x294/frame 0xfffffe0131d05aa0 +# calltrap() at calltrap+0x8/frame 0xfffffe0131d05aa0 +# --- trap 0xc, rip = 0, rsp = 0xfffffe0131d05b78, rbp = 0xfffffe0131d05bb0 --- +# ??() at 0/frame 0xfffffe0131d05bb0 +# fork_exit() at fork_exit+0x80/frame 0xfffffe0131d05bf0 +# fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0131d05bf0 +# --- trap 0, rip = 0, rsp = 0, rbp = 0 --- +# KDB: enter: panic +# [ thread pid 35 tid 100272 ] +# Stopped at kdb_enter+0x37: movq $0,0x127fb8e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #0 main-n247181-1b5bc3a54b6: Sat Jun 5 04:12:19 CEST 2021 +# pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO +# db> + +[ `uname -p` != "amd64" ] && exit 0 +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +cat > /tmp/syzkaller41.c < +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; +} + +static void thread_start(void* (*fn)(void*), void* arg) +{ + pthread_t th; + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, 128 << 10); + int i = 0; + for (; i < 100; i++) { + if (pthread_create(&th, &attr, fn, arg) == 0) { + pthread_attr_destroy(&attr); + return; + } + if (errno == EAGAIN) { + usleep(50); + continue; + } + break; + } + exit(1); +} + +typedef struct { + pthread_mutex_t mu; + pthread_cond_t cv; + int state; +} event_t; + +static void event_init(event_t* ev) +{ + if (pthread_mutex_init(&ev->mu, 0)) + exit(1); + if (pthread_cond_init(&ev->cv, 0)) + exit(1); + ev->state = 0; +} + +static void event_reset(event_t* ev) +{ + ev->state = 0; +} + +static void event_set(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + if (ev->state) + exit(1); + ev->state = 1; + pthread_mutex_unlock(&ev->mu); + pthread_cond_broadcast(&ev->cv); +} + +static void event_wait(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + while (!ev->state) + pthread_cond_wait(&ev->cv, &ev->mu); + pthread_mutex_unlock(&ev->mu); +} + +static int event_isset(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +static int event_timedwait(event_t* ev, uint64_t timeout) +{ + uint64_t start = current_time_ms(); + uint64_t now = start; + pthread_mutex_lock(&ev->mu); + for (;;) { + if (ev->state) + break; + uint64_t remain = timeout - (now - start); + struct timespec ts; + ts.tv_sec = remain / 1000; + ts.tv_nsec = (remain % 1000) * 1000 * 1000; + pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); + now = current_time_ms(); + if (now - start > timeout) + break; + } + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +struct thread_t { + int created, call; + event_t ready, done; +}; + +static struct thread_t threads[16]; +static void execute_call(int call); +static int running; + +static void* thr(void* arg) +{ + struct thread_t* th = (struct thread_t*)arg; + for (;;) { + event_wait(&th->ready); + event_reset(&th->ready); + execute_call(th->call); + __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); + event_set(&th->done); + } + return 0; +} + +static void loop(void) +{ + int i, call, thread; + for (call = 0; call < 4; call++) { + for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); + thread++) { + struct thread_t* th = &threads[thread]; + if (!th->created) { + th->created = 1; + event_init(&th->ready); + event_init(&th->done); + event_set(&th->done); + thread_start(thr, th); + } + if (!event_isset(&th->done)) + continue; + event_reset(&th->done); + th->call = call; + __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); + event_set(&th->ready); + event_timedwait(&th->done, 50); + break; + } + } + for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) + sleep_ms(1); +} + +uint64_t r[1] = {0xffffffffffffffff}; + +void execute_call(int call) +{ + intptr_t res = 0; + switch (call) { + case 0: + res = syscall(SYS_socket, 0x1cul, 1ul, 0); + if (res != -1) + r[0] = res; + break; + case 1: + *(uint32_t*)0x20000300 = r[0]; + *(uint64_t*)0x20000308 = 0x9a6; + *(uint64_t*)0x20000310 = 0; + *(uint64_t*)0x20000318 = 0; + *(uint32_t*)0x20000320 = 0xffe; + *(uint32_t*)0x20000324 = 0x100; + *(uint64_t*)0x20000328 = 0x2b8; + *(uint32_t*)0x20000330 = 4; + *(uint32_t*)0x20000334 = 0xfff; + *(uint64_t*)0x20000338 = 3; + *(uint64_t*)0x20000340 = 0x80000001; + *(uint64_t*)0x20000348 = 0; + *(uint32_t*)0x20000350 = 4; + *(uint32_t*)0x20000354 = 0xb; + *(uint64_t*)0x20000358 = 9; + *(uint64_t*)0x20000360 = 0xa3c5; + *(uint64_t*)0x20000368 = 0xfffffffffffffff7; + *(uint64_t*)0x20000370 = 0x8000; + *(uint64_t*)0x20000378 = 3; + *(uint64_t*)0x20000380 = 0x498c; + *(uint64_t*)0x20000388 = 8; + *(uint64_t*)0x20000390 = 4; + *(uint64_t*)0x20000398 = 3; + syscall(SYS_aio_read, 0x20000300ul); + break; + case 2: + *(uint8_t*)0x20000000 = 0x1c; + *(uint8_t*)0x20000001 = 0x1c; + *(uint16_t*)0x20000002 = htobe16(0x4e21); + *(uint32_t*)0x20000004 = 0; + *(uint8_t*)0x20000008 = 0xfe; + *(uint8_t*)0x20000009 = 0x80; + memset((void*)0x2000000a, 0, 12); + *(uint8_t*)0x20000016 = 0; + *(uint8_t*)0x20000017 = 0xaa; + *(uint32_t*)0x20000018 = 1; + syscall(SYS_connect, r[0], 0x20000000ul, 0x1cul); + break; + case 3: + syscall(SYS_shutdown, r[0], 0ul); + break; + } +} +int main(void) +{ + syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x1012ul, -1, 0ul); + loop(); + return 0; +} +EOF +mycc -o /tmp/syzkaller41 -Wall -Wextra -O0 /tmp/syzkaller41.c -lpthread || + exit 1 + +(cd /tmp; timeout 3m ./syzkaller41) + +rm -rf /tmp/syzkaller41 syzkaller41.c /tmp/syzkaller.* +exit 0 From owner-dev-commits-src-main@freebsd.org Mon Jun 7 05:36:16 2021 Return-Path: Delivered-To: dev-commits-src-main@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 41D7A647BB5; Mon, 7 Jun 2021 05:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fz2D01D5xz3h2K; Mon, 7 Jun 2021 05:36: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 115BF117AC; Mon, 7 Jun 2021 05:36: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 1575aFY1058318; Mon, 7 Jun 2021 05:36:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1575aFMR058317; Mon, 7 Jun 2021 05:36:15 GMT (envelope-from git) Date: Mon, 7 Jun 2021 05:36:15 GMT Message-Id: <202106070536.1575aFMR058317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 201434ecaca7 - main - stress2: Added two test scenarios based on Bug 256205 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 201434ecaca79cc0fea4bca7350fc5b7ac941a81 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 05:36:16 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=201434ecaca79cc0fea4bca7350fc5b7ac941a81 commit 201434ecaca79cc0fea4bca7350fc5b7ac941a81 Author: Peter Holm AuthorDate: 2021-06-07 05:35:10 +0000 Commit: Peter Holm CommitDate: 2021-06-07 05:35:10 +0000 stress2: Added two test scenarios based on Bug 256205 --- tools/test/stress2/misc/zfs12.sh | 133 +++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/zfs13.sh | 82 +++++++++++++++++++++++ tools/test/stress2/tools/lsholes.c | 86 ++++++++++++++++++++++++ 3 files changed, 301 insertions(+) diff --git a/tools/test/stress2/misc/zfs12.sh b/tools/test/stress2/misc/zfs12.sh new file mode 100755 index 000000000000..cfabca2b9f6f --- /dev/null +++ b/tools/test/stress2/misc/zfs12.sh @@ -0,0 +1,133 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# lseek(SEEK_HOLE): finds hole +# Test scenario suggestion by: kib@ +# Related to: +# Bug 256205 - ZFS: data corruption with SEEK_HOLE/SEEK_DATA on dirty files ... + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +kldstat -v | grep -q zfs.ko || { kldload zfs.ko; loaded=1; } || + exit 0 + +. ../default.cfg + +here=`pwd` +cd /tmp +sed '1,/^EOF/d' < $here/$0 > zfs12.c +mycc -o zfs12 -Wall -Wextra -O0 -g zfs12.c || exit 1 +rm -f zfs12.c +cc -o /tmp/lsholes -Wall -Wextra -O2 $here/../tools/lsholes.c | exit 1 + +mp1=/stress2_tank/test +u1=$mdstart +u2=$((u1 + 1)) + +set -e +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 + +mdconfig -s 2g -u $u1 +mdconfig -s 2g -u $u2 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank md$u1 md$u2 +zfs create stress2_tank/test +set +e + +(cd $here/../testcases/swap; ./swap -t 2m -i 20 -l 100 -h > /dev/null) & +file1=$mp1/file # zfs path +sleep 20 +/tmp/zfs12 $file1 +/tmp/lsholes $file1 +s=$? +while pkill swap; do sleep 1; done +wait + +zfs umount stress2_tank/test +zfs destroy -r stress2_tank +zpool destroy stress2_tank +mdconfig -d -u $u1 +mdconfig -d -u $u2 +rm -f /tmp/zfs12 /tmp/lsholes +[ $loaded ] && kldunload zfs.ko +exit $s +EOF +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SIZ (500UL * 1024 * 1024) + +int +main(int argc __unused, char *argv[]) +{ + off_t hole; + size_t len; + int fd; + char *p, *path; + + len = SIZ; + + path = argv[1]; + if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) + err(1,"open()"); + if (ftruncate(fd, len) == -1) + err(1, "ftruncate"); + if ((p = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == + MAP_FAILED) { + if (errno == ENOMEM) + return (1); + err(1, "mmap(1)"); + } + p[1 * 1024] = 1; + p[2 * 1024] = 1; + p[4 * 1024] = 1; + + if (msync(p, len, MS_SYNC | MS_INVALIDATE) == -1) + err(1, "msync()"); + + if ((hole = lseek(fd, 0, SEEK_HOLE)) == -1) + err(1, "lseek(SEEK_HOLE)"); + if (hole != SIZ) + printf("--> hole = %jd, file size=%jd\n", + (intmax_t)hole, (intmax_t)SIZ); + close(fd); + + return (hole == SIZ ? 0 : 1); +} diff --git a/tools/test/stress2/misc/zfs13.sh b/tools/test/stress2/misc/zfs13.sh new file mode 100755 index 000000000000..2ccd4388270d --- /dev/null +++ b/tools/test/stress2/misc/zfs13.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# Sparse files test. +# Delayed write observed. +# Related to: +# Bug 256205 - ZFS: data corruption with SEEK_HOLE/SEEK_DATA on dirty files ... + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +kldstat -v | grep -q zfs.ko || { kldload zfs.ko; loaded=1; } || + exit 0 + +. ../default.cfg + +here=`pwd` +cd /tmp +mycc -o /tmp/lsholes -Wall -Wextra -O0 -g $here/../tools/lsholes.c || exit 1 + +log1=/tmp/zfs13.sh.1.log +log2=/tmp/zfs13.sh.2.log +mp1=/stress2_tank/test +u1=$mdstart +u2=$((u1 + 1)) + +set -e +mdconfig -l | grep -q md$u1 && mdconfig -d -u $u1 +mdconfig -l | grep -q md$u2 && mdconfig -d -u $u2 + +mdconfig -s 2g -u $u1 +mdconfig -s 2g -u $u2 + +zpool list | egrep -q "^stress2_tank" && zpool destroy stress2_tank +[ -d /stress2_tank ] && rm -rf /stress2_tank +zpool create stress2_tank md$u1 md$u2 +zfs create stress2_tank/test +set +e + +cd $mp1 +dd if=/etc/passwd conv=notrunc oseek=32k of=output status=none +ls -ls | grep output | tee $log1 +/tmp/lsholes output +sleep 10 +ls -ls | grep output | tee $log2 +/tmp/lsholes output +cd $here + +zfs umount stress2_tank/test +zfs destroy -r stress2_tank +zpool destroy stress2_tank +mdconfig -d -u $u1 +mdconfig -d -u $u2 +cmp -s $log1 $log2 +s=$? +rm -f /tmp/lsholes $log1 $log2 +[ $loaded ] && kldunload zfs.ko +exit $s diff --git a/tools/test/stress2/tools/lsholes.c b/tools/test/stress2/tools/lsholes.c new file mode 100644 index 000000000000..a583c1315093 --- /dev/null +++ b/tools/test/stress2/tools/lsholes.c @@ -0,0 +1,86 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Peter Holm + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + struct stat st; + off_t data, hole, pos; + long mx; + int fd, n; + char *name; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \n", argv[0]); + exit(1); + } + + name = argv[1]; + if ((fd = open(name, O_RDONLY)) == -1) + err(1, "open(%s)", name); + if (fstat(fd, &st)) + err(1, "fstat()"); + if ((mx = fpathconf(fd, _PC_MIN_HOLE_SIZE)) == -1) + err(1, "fpathconf()"); + fprintf(stderr, "file \"%s\" size = %jd, _PC_MIN_HOLE_SIZE = %ld\n", + name, (intmax_t)st.st_size, mx); + n = 1; + pos = 0; + while (pos < st.st_size) { + if ((hole = lseek(fd, pos, SEEK_HOLE)) == -1) + err(1, "lseek(SEEK_HOLE)"); + if ((data = lseek(fd, hole, SEEK_DATA)) == -1) { + if (errno == ENXIO) { + if (hole == st.st_size) + break; + fprintf(stderr, + "No data after hole @ %jd\n", + (intmax_t)hole); + break; + } + err(1, "lseek(SEEK_DATA)"); + } + pos = data; + printf("hole #%d @ %jd (0x%jx), size=%jd (0x%jx)\n", + n, (intmax_t)hole, (intmax_t)hole, (intmax_t)(data - hole), + (intmax_t)(data - hole)); + n++; + } + close(fd); + if (hole != st.st_size) + errx(1, "No implicit hole at EOF"); +} From owner-dev-commits-src-main@freebsd.org Mon Jun 7 06:32:10 2021 Return-Path: Delivered-To: dev-commits-src-main@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 332A4648BD3; Mon, 7 Jun 2021 06:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fz3SV10Vjz3n1g; Mon, 7 Jun 2021 06:32: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 00F39120BB; Mon, 7 Jun 2021 06:32: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 1576W9rp035370; Mon, 7 Jun 2021 06:32:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1576W931035369; Mon, 7 Jun 2021 06:32:09 GMT (envelope-from git) Date: Mon, 7 Jun 2021 06:32:09 GMT Message-Id: <202106070632.1576W931035369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: aaa28628a3e4 - main - fifolog: Rename yyparse() to getdate_yyparse(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aaa28628a3e4f66d9642eb4b6e6c49b5b61d4dce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 06:32:10 -0000 The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=aaa28628a3e4f66d9642eb4b6e6c49b5b61d4dce commit aaa28628a3e4f66d9642eb4b6e6c49b5b61d4dce Author: Poul-Henning Kamp AuthorDate: 2021-06-07 06:30:34 +0000 Commit: Poul-Henning Kamp CommitDate: 2021-06-07 06:31:50 +0000 fifolog: Rename yyparse() to getdate_yyparse(). Remove config file for obsolete static analyzer FlexeLint --- usr.sbin/fifolog/flint.lnt | 55 ------------------------------------------ usr.sbin/fifolog/lib/getdate.y | 2 ++ 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/usr.sbin/fifolog/flint.lnt b/usr.sbin/fifolog/flint.lnt deleted file mode 100644 index 87e0c86cef07..000000000000 --- a/usr.sbin/fifolog/flint.lnt +++ /dev/null @@ -1,55 +0,0 @@ -// $FreeBSD$ -// FlexeLint file for fifolog tools -// -// -//-passes=3 -//-ffc -// -//// GCC -//-cgnu -//+d__FreeBSD__=7 -//+d__GNUC__=4 -//+d__GNUC_MINOR__=2 -//+d__FreeBSD_cc_version=700003 -//+d__attribute__()= -//-d__builtin_va_list=void* // used by stdarg.h -//// -d__builtin_stdarg_start()=_to_semi // ditto -//// -d__builtin_va_start(a,b)=((void)(b),(a)=0) // ditto -//// -d__builtin_va_end()=_to_semi // ditto -//+rw(__inline) // enable the (non-standard) __inline keyword -//+rw(__inline__) // enable the (non-standard) __inline__ keyword -// -//+d"__unused=/*lint -e{715} -e{818} */" -// -//-e537 // Repeated include file -//-elib(652) // #define of symbol '...' declared previously -//-function(exit,__assert) -//-function(exit,err) -//-function(exit,errx) -//-e716 // while(1) ... -//-e717 // do ... while(0) -// -//// Ignore return values --esym(534, memset) --esym(534, memcpy) --esym(534, strcpy) -//-esym(534, printf) --esym(534, time) --esym(534, fprintf) -//-esym(534, vfprintf) -// -//+libh(fifolog.h) -//+libh(miniobj.h) -//+libh(libfifolog.h) -// -//-e713 // loss of precision sign/unsigned -//-e732 // loss of sign -//-e734 // loss of precision assignment -//-e737 // loss of sign in promotion int->unsigned -//-e573 // sign/unsign mix in divide - --e712 // Loss of precision (___) (___ to ___) --e713 // Loss of precision (___) (___ to ___) --e716 // while(1) ... --e732 // Loss of sign (___) (___ to ___) --e747 // Significant prototype coercion (___) ___ to ___ diff --git a/usr.sbin/fifolog/lib/getdate.y b/usr.sbin/fifolog/lib/getdate.y index 53a515c4d17e..8e63e8112993 100644 --- a/usr.sbin/fifolog/lib/getdate.y +++ b/usr.sbin/fifolog/lib/getdate.y @@ -24,9 +24,11 @@ #include "libfifolog.h" +#define yyparse getdate_yyparse #define yylex getdate_yylex #define yyerror getdate_yyerror +static int yyparse(void); static int yylex(void); static int yyerror(const char *); From owner-dev-commits-src-main@freebsd.org Mon Jun 7 10:45:13 2021 Return-Path: Delivered-To: dev-commits-src-main@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 C68F664BB88; Mon, 7 Jun 2021 10:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fz94T52Yqz4jm2; Mon, 7 Jun 2021 10:45:13 +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 93B15143B2; Mon, 7 Jun 2021 10:45:13 +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 157AjDjk039844; Mon, 7 Jun 2021 10:45:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157AjDCU039843; Mon, 7 Jun 2021 10:45:13 GMT (envelope-from git) Date: Mon, 7 Jun 2021 10:45:13 GMT Message-Id: <202106071045.157AjDCU039843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 128a1db806da - main - linux: improve FUSE support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 128a1db806daac088a79314cee060b8a204e8481 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 10:45:13 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=128a1db806daac088a79314cee060b8a204e8481 commit 128a1db806daac088a79314cee060b8a204e8481 Author: Edward Tomasz Napierala AuthorDate: 2021-06-07 09:43:23 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-07 09:43:28 +0000 linux: improve FUSE support This fixes a number of AppImages; tested with scribus-1.5.6.1-linux-x86_64.AppImage. Reported By: @probonopd Reviewed By: asomers, emaste Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30606 --- sys/compat/linux/linux_file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a6cf467d6219..a5ab3506767e 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1320,12 +1320,11 @@ linux_mount(struct thread *td, struct linux_mount_args *args) strcpy(fstypename, "linprocfs"); } else if (strcmp(fstypename, "vfat") == 0) { strcpy(fstypename, "msdosfs"); - } else if (strcmp(fstypename, "fuse") == 0) { + } else if (strcmp(fstypename, "fuse") == 0 || + strncmp(fstypename, "fuse.", 5) == 0) { char *fuse_options, *fuse_option, *fuse_name; - if (strcmp(mntfromname, "fuse") == 0) - strcpy(mntfromname, "/dev/fuse"); - + strcpy(mntfromname, "/dev/fuse"); strcpy(fstypename, "fusefs"); data = malloc(MNAMELEN, M_TEMP, M_WAITOK); error = copyinstr(args->data, data, MNAMELEN - 1, NULL); From owner-dev-commits-src-main@freebsd.org Mon Jun 7 10:52:13 2021 Return-Path: Delivered-To: dev-commits-src-main@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 0379064BE27; Mon, 7 Jun 2021 10:52:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fz9DX6kh3z4kn6; Mon, 7 Jun 2021 10:52: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 CF6B414802; Mon, 7 Jun 2021 10:52: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 157AqCvH051520; Mon, 7 Jun 2021 10:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157AqCxY051503; Mon, 7 Jun 2021 10:52:12 GMT (envelope-from git) Date: Mon, 7 Jun 2021 10:52:12 GMT Message-Id: <202106071052.157AqCxY051503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: dd869341b1e0 - main - Install the linux(4) man page also for aarch64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd869341b1e0b58eb50fd2700b3191094d97ef5b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 10:52:13 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=dd869341b1e0b58eb50fd2700b3191094d97ef5b commit dd869341b1e0b58eb50fd2700b3191094d97ef5b Author: Edward Tomasz Napierala AuthorDate: 2021-06-07 10:50:25 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-07 10:50:50 +0000 Install the linux(4) man page also for aarch64 Previously it was only installed on i386 and amd64. Reviewed By: emaste, gbe (manpages) Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30546 --- share/man/man4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f7626c80eeb1..88414801888f 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -820,7 +820,6 @@ _imcsmb.4= imcsmb.4 _ipmi.4= ipmi.4 _io.4= io.4 _itwd.4= itwd.4 -_linux.4= linux.4 _nda.4= nda.4 _nfe.4= nfe.4 _nfsmb.4= nfsmb.4 @@ -888,6 +887,7 @@ _nvme.4= nvme.4 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "aarch64" +_linux.4= linux.4 _ossl.4= ossl.4 .endif From owner-dev-commits-src-main@freebsd.org Mon Jun 7 13:55:49 2021 Return-Path: Delivered-To: dev-commits-src-main@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 4622C64E4E6; Mon, 7 Jun 2021 13:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzFJP0vZDz3CWG; Mon, 7 Jun 2021 13:55:49 +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 079D716BA4; Mon, 7 Jun 2021 13:55:49 +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 157Dtm00091792; Mon, 7 Jun 2021 13:55:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157DtmJ0091791; Mon, 7 Jun 2021 13:55:48 GMT (envelope-from git) Date: Mon, 7 Jun 2021 13:55:48 GMT Message-Id: <202106071355.157DtmJ0091791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?B?U3RlZmFuIEXDn2Vy?= Subject: git: 35b8fd0b699a - main - usr.bin/calendar: do not treat // in text as comment 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/main X-Git-Reftype: branch X-Git-Commit: 35b8fd0b699a20f71d5636069347b243eb336979 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 13:55:49 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=35b8fd0b699a20f71d5636069347b243eb336979 commit 35b8fd0b699a20f71d5636069347b243eb336979 Author: Stefan Eßer AuthorDate: 2021-06-07 13:46:24 +0000 Commit: Stefan Eßer CommitDate: 2021-06-07 13:55:23 +0000 usr.bin/calendar: do not treat // in text as comment The C++-style comment marker "//" has been added with the rewrite of the preprocessor features. Since this character sequence occurs in ULRS, the reminder of the URL was considered a comment and stripped from the calendar line. Change parsing of "//" to only start a comment at the begin of a line or when preceeded by a white-space character. PR: 256455 Reported by: Philippe Michel (philippe.michel7 at free.fr) MFC after: 3 days --- usr.bin/calendar/io.c | 22 ++++++++++++++-------- usr.bin/calendar/tests/calendar.comment | 3 ++- usr.bin/calendar/tests/regress.comment.out | 2 ++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 24966399c179..5afcb1a33314 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -405,7 +405,7 @@ cal_parse(FILE *in, FILE *out) { char *mylocale = NULL; char *line = NULL; - char *buf; + char *buf, *bufp; size_t linecap = 0; ssize_t linelen; ssize_t l; @@ -443,21 +443,27 @@ cal_parse(FILE *in, FILE *out) } } if (!incomment) { + bufp = buf; do { - c = strstr(buf, "//"); - cc = strstr(buf, "/*"); + c = strstr(bufp, "//"); + cc = strstr(bufp, "/*"); if (c != NULL && (cc == NULL || c - cc < 0)) { - /* single line comment */ - *c = '\0'; - linelen = c - buf; - break; + bufp = c + 2; + /* ignore "//" within string to allow it in an URL */ + if (c == buf || isspace(c[-1])) { + /* single line comment */ + *c = '\0'; + linelen = c - buf; + break; + } } else if (cc != NULL) { c = strstr(cc + 2, "*/"); - if (c != NULL) { + if (c != NULL) { // 'a /* b */ c' -- cc=2, c=7+2 /* multi-line comment ending on same line */ c += 2; memmove(cc, c, buf + linelen + 1 - c); linelen -= c - cc; + bufp = cc; } else { /* multi-line comment */ *cc = '\0'; diff --git a/usr.bin/calendar/tests/calendar.comment b/usr.bin/calendar/tests/calendar.comment index 6af037ec7e9d..837e5af9e89e 100644 --- a/usr.bin/calendar/tests/calendar.comment +++ b/usr.bin/calendar/tests/calendar.comment @@ -7,4 +7,5 @@ 1/* comment */ 6 jan 6 1 7 jan 7 // /* comment */ comment 1 1/* comment */1 jan /* comment */11 // comment - +1 12 http://localhost.local/ +1 13 http://localhost.local/ // URL with additional comment diff --git a/usr.bin/calendar/tests/regress.comment.out b/usr.bin/calendar/tests/regress.comment.out index 1ba3d8cc640e..fb58fd29ff05 100644 --- a/usr.bin/calendar/tests/regress.comment.out +++ b/usr.bin/calendar/tests/regress.comment.out @@ -6,3 +6,5 @@ Jan 5 jan 5 Jan 6 jan 6 Jan 7 jan 7 Jan 11 jan 11 +Jan 12 http://localhost.local/ +Jan 13 http://localhost.local/ From owner-dev-commits-src-main@freebsd.org Mon Jun 7 14:32:31 2021 Return-Path: Delivered-To: dev-commits-src-main@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 7F59064F026; Mon, 7 Jun 2021 14:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzG6l38bHz3Frw; Mon, 7 Jun 2021 14:32:31 +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 552CC174AE; Mon, 7 Jun 2021 14:32:31 +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 157EWV4j044656; Mon, 7 Jun 2021 14:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157EWVIk044655; Mon, 7 Jun 2021 14:32:31 GMT (envelope-from git) Date: Mon, 7 Jun 2021 14:32:31 GMT Message-Id: <202106071432.157EWVIk044655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 05c2d94a081d - main - LinuxKPI: add pr_err_once MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05c2d94a081d5948560a01c26c7f432960cde606 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 14:32:31 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=05c2d94a081d5948560a01c26c7f432960cde606 commit 05c2d94a081d5948560a01c26c7f432960cde606 Author: Greg V AuthorDate: 2021-06-07 14:30:18 +0000 Commit: Ed Maste CommitDate: 2021-06-07 14:31:48 +0000 LinuxKPI: add pr_err_once Reviewed by: hselasky, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30672 --- sys/compat/linuxkpi/common/include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 807138334fdd..f34179d9566b 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -251,6 +251,8 @@ extern int linuxkpi_debug; log(LOG_CRIT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_err(fmt, ...) \ log(LOG_ERR, pr_fmt(fmt), ##__VA_ARGS__) +#define pr_err_once(fmt, ...) \ + log_once(LOG_ERR, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warning(fmt, ...) \ log(LOG_WARNING, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warn(...) \ From owner-dev-commits-src-main@freebsd.org Mon Jun 7 20:47:14 2021 Return-Path: Delivered-To: dev-commits-src-main@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 6ECBA653D03; Mon, 7 Jun 2021 20:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzQR61gDgz4Z0Q; Mon, 7 Jun 2021 20:47:14 +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 1A6991C515; Mon, 7 Jun 2021 20:47:14 +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 157KlD02034944; Mon, 7 Jun 2021 20:47:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157KlDgD034943; Mon, 7 Jun 2021 20:47:13 GMT (envelope-from git) Date: Mon, 7 Jun 2021 20:47:13 GMT Message-Id: <202106072047.157KlDgD034943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 887c753c9f45 - main - Fix handling of D_GIANTOK MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 887c753c9f451322cae3efbf9b63f53f3d9011c8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 20:47:14 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=887c753c9f451322cae3efbf9b63f53f3d9011c8 commit 887c753c9f451322cae3efbf9b63f53f3d9011c8 Author: Mark Johnston AuthorDate: 2021-06-07 18:25:26 +0000 Commit: Mark Johnston CommitDate: 2021-06-07 20:45:50 +0000 Fix handling of D_GIANTOK It was meant to suppress only the printf(), not the subsequent injection of Giant-protected thunks for various file operations. Fixes: fbeb4ccac9 Reported by: pho Tested by: pho MFC after: 6 days Pointy hat: markj --- sys/kern/kern_conf.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 42435c0b8740..cb575114571a 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -665,10 +665,13 @@ prep_cdevsw(struct cdevsw *devsw, int flags) devsw->d_kqfilter = dead_kqfilter; } - if ((devsw->d_flags & (D_NEEDGIANT | D_GIANTOK)) == D_NEEDGIANT) { - printf("WARNING: Device \"%s\" is Giant locked and may be " - "deleted before FreeBSD 14.0.\n", - devsw->d_name == NULL ? "???" : devsw->d_name); + if ((devsw->d_flags & D_NEEDGIANT) != 0) { + if ((devsw->d_flags & D_GIANTOK) == 0) { + printf( + "WARNING: Device \"%s\" is Giant locked and may be " + "deleted before FreeBSD 14.0.\n", + devsw->d_name == NULL ? "???" : devsw->d_name); + } if (devsw->d_gianttrick == NULL) { memcpy(dsw2, devsw, sizeof *dsw2); devsw->d_gianttrick = dsw2; From owner-dev-commits-src-main@freebsd.org Mon Jun 7 20:51:47 2021 Return-Path: Delivered-To: dev-commits-src-main@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 F28FB653BA3; Mon, 7 Jun 2021 20:51:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzQXL5pY5z4ZJR; Mon, 7 Jun 2021 20:51:46 +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 AF6E91C69B; Mon, 7 Jun 2021 20:51:46 +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 157Kpk9Y044343; Mon, 7 Jun 2021 20:51:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157Kpkfm044342; Mon, 7 Jun 2021 20:51:46 GMT (envelope-from git) Date: Mon, 7 Jun 2021 20:51:46 GMT Message-Id: <202106072051.157Kpkfm044342@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: 03c81af24920 - main - nfscl: Fix generation of va_fsid for a tree of NFSv4 server file systems 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: 03c81af24920e14bd977f34edcd3eb7fb122db19 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 20:51:47 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=03c81af24920e14bd977f34edcd3eb7fb122db19 commit 03c81af24920e14bd977f34edcd3eb7fb122db19 Author: Rick Macklem AuthorDate: 2021-06-07 20:48:25 +0000 Commit: Rick Macklem CommitDate: 2021-06-07 20:48:25 +0000 nfscl: Fix generation of va_fsid for a tree of NFSv4 server file systems Pre-r318997 the code looked like: if (vp->v_mount->mnt_stat.f_fsid.val[0] != (uint32_t)np->n_vattr.na_filesid[0]) vap->va_fsid = (uint32_t)np->n_vattr.na_filesid[0]; Doing this assignment got lost by r318997 and, as such, NFSv4 mounts of servers with trees of file systems on the server is broken, due to duplicate fileno values for the same st_dev/va_fsid. Although I could have re-introduced the assignment, since the value of na_filesid[0] is not guaranteed to be unique across the server file systems, I felt it was better to always do the hash for na_filesid[0,1]. Since dev_t (st_dev/va_fsid) is now 64bits, I switched to a 64bit hash. There is a slight chance of a hash conflict where 2 different na_filesid values map to same va_fsid, which will be documented in the BUGS section of the man page for mount_nfs(8). Using a table to keep track of mappings to catch conflicts would not easily scale to 10,000+ server file systems and, when the conflict occurs, it only results in fts(3) reporting a "directory cycle" under certain circumstances. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30660 --- sys/fs/nfsclient/nfs_clport.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 4676f09f8e86..90d403334155 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -441,6 +441,7 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvattr *nap, void *nvaper, struct nfsmount *nmp; struct timespec mtime_save; int error, force_fid_err; + dev_t topfsid; error = 0; @@ -504,28 +505,30 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsvattr *nap, void *nvaper, } /* - * For NFSv4, if the node's fsid is not equal to the mount point's - * fsid, return the low order 32bits of the node's fsid. This - * allows getcwd(3) to work. There is a chance that the fsid might - * be the same as a local fs, but since this is in an NFS mount - * point, I don't think that will cause any problems? + * For NFSv4, the server's export may be a tree of file systems + * where a fileno is a unique value within each file system. + * na_filesid[0,1] uniquely identify the server file system + * and nm_fsid[0,1] is the value for the root file system mounted. + * As such, the value of va_fsid generated by vn_fsid() represents + * the root file system on the server and a different value for + * va_fsid is needed for the other server file systems. This + * va_fsid is ideally unique for all of the server file systems, + * so a 64bit hash on na_filesid[0,1] is calculated. + * Although highly unlikely that the fnv_64_hash() will be + * the same as the root, test for this case and recalculate the hash. */ + vn_fsid(vp, vap); if (NFSHASNFSV4(nmp) && NFSHASHASSETFSID(nmp) && (nmp->nm_fsid[0] != np->n_vattr.na_filesid[0] || nmp->nm_fsid[1] != np->n_vattr.na_filesid[1])) { - /* - * va_fsid needs to be set to some value derived from - * np->n_vattr.na_filesid that is not equal - * vp->v_mount->mnt_stat.f_fsid[0], so that it changes - * from the value used for the top level server volume - * in the mounted subtree. - */ - vn_fsid(vp, vap); - if ((uint32_t)vap->va_fsid == np->n_vattr.na_filesid[0]) - vap->va_fsid = hash32_buf( - np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0); - } else - vn_fsid(vp, vap); + topfsid = vap->va_fsid; + vap->va_fsid = FNV1_64_INIT; + do { + vap->va_fsid = fnv_64_buf(np->n_vattr.na_filesid, + sizeof(np->n_vattr.na_filesid), vap->va_fsid); + } while (vap->va_fsid == topfsid); + } + np->n_attrstamp = time_second; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { From owner-dev-commits-src-main@freebsd.org Mon Jun 7 22:52:01 2021 Return-Path: Delivered-To: dev-commits-src-main@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 01F4265538D; Mon, 7 Jun 2021 22:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzTC45Hy6z4k2p; Mon, 7 Jun 2021 22:52: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 9F7331DF16; Mon, 7 Jun 2021 22:52: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 157Mq09E006750; Mon, 7 Jun 2021 22:52:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157Mq0h2006749; Mon, 7 Jun 2021 22:52:00 GMT (envelope-from git) Date: Mon, 7 Jun 2021 22:52:00 GMT Message-Id: <202106072252.157Mq0h2006749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 225605ec1681 - main - Cirrus-CI: Use the default Git history depth MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 225605ec1681d5ac08b297aa4efbc64bcb950fc2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 22:52:01 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=225605ec1681d5ac08b297aa4efbc64bcb950fc2 commit 225605ec1681d5ac08b297aa4efbc64bcb950fc2 Author: Fedor Korotkov AuthorDate: 2021-01-29 14:22:54 +0000 Commit: Ed Maste CommitDate: 2021-06-07 22:50:18 +0000 Cirrus-CI: Use the default Git history depth Which is `50`. I saw a few errors like `Failed to force reset to SHA: object not found!` which seems is happening because the SHA is not available because there were two commits pushed almost simultaneously and the second from the top fails with this error because the SHA is not in the history. Pull Request: https://github.com/freebsd/freebsd-src/pull/454 Comments on re-commit from emaste: Originally committed as fcb4797c90f3 and reverted in 80a840b8ba03 due to the clone operation taking significantly longer. However, I have seen many failures due to the "object not found" issue recently. 7 of 37 recent runs failed because of this, and intermittent failures like this makes CI much less useful. Prefer longer-running runs to intermittent failures. --- .cirrus.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 823d8bc2e1b0..db0e4e4c0543 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,9 +10,6 @@ compute_engine_instance: memory: 24G disk: 40 -env: - CIRRUS_CLONE_DEPTH: 1 - task: name: World and kernel amd64 build and boot smoke test timeout_in: 120m From owner-dev-commits-src-main@freebsd.org Mon Jun 7 22:53:17 2021 Return-Path: Delivered-To: dev-commits-src-main@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 82F4465549D; Mon, 7 Jun 2021 22:53:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzTDY27PYz4k3Q; Mon, 7 Jun 2021 22:53:17 +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 328221DF54; Mon, 7 Jun 2021 22:53:17 +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 157MrHRP006971; Mon, 7 Jun 2021 22:53:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157MrH2k006970; Mon, 7 Jun 2021 22:53:17 GMT (envelope-from git) Date: Mon, 7 Jun 2021 22:53:17 GMT Message-Id: <202106072253.157MrH2k006970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: 096104e790fb - main - linuxkpi: Add rom and romlen to struct pci_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 096104e790fb182d230f25f169792cc610b8f41c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 22:53:17 -0000 The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=096104e790fb182d230f25f169792cc610b8f41c commit 096104e790fb182d230f25f169792cc610b8f41c Author: Neel Chauhan AuthorDate: 2021-06-07 22:50:46 +0000 Commit: Neel Chauhan CommitDate: 2021-06-07 22:53:24 +0000 linuxkpi: Add rom and romlen to struct pci_dev Approved by: bz (src), hselasky (src) Differential Reivison: https://reviews.freebsd.org/D30686 --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index f1b928b792fa..36a82e81b4bc 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -230,6 +230,8 @@ struct pci_dev { uint32_t class; uint8_t revision; bool msi_enabled; + phys_addr_t rom; + size_t romlen; TAILQ_HEAD(, pci_mmio_region) mmio; }; From owner-dev-commits-src-main@freebsd.org Mon Jun 7 22:53:18 2021 Return-Path: Delivered-To: dev-commits-src-main@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 8CC8F655522; Mon, 7 Jun 2021 22:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzTDZ3F73z4kDt; Mon, 7 Jun 2021 22:53:18 +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 55A171DE5F; Mon, 7 Jun 2021 22:53:18 +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 157MrISV006994; Mon, 7 Jun 2021 22:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157MrItr006993; Mon, 7 Jun 2021 22:53:18 GMT (envelope-from git) Date: Mon, 7 Jun 2021 22:53:18 GMT Message-Id: <202106072253.157MrItr006993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: 37d64dcdfa51 - main - linuxkpi: Include pr_err_once() in printk.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37d64dcdfa519157aff9711f1f226ad7bd778f46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 22:53:18 -0000 The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=37d64dcdfa519157aff9711f1f226ad7bd778f46 commit 37d64dcdfa519157aff9711f1f226ad7bd778f46 Author: Neel Chauhan AuthorDate: 2021-06-07 22:52:37 +0000 Commit: Neel Chauhan CommitDate: 2021-06-07 22:53:24 +0000 linuxkpi: Include pr_err_once() in printk.h Approved by: bz (src), hselasky (src) Differential Reivison: https://reviews.freebsd.org/D30687 --- sys/compat/linuxkpi/common/include/linux/printk.h | 3 +++ sys/sys/param.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index e6510e9e9834..ac3fdb9f31ae 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -127,4 +127,7 @@ print_hex_dump_bytes(const char *prefix_str, const int prefix_type, #define pr_info_ratelimited(fmt, ...) \ printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) +#define pr_err_once(fmt, ...) \ + printk_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + #endif /* _LINUX_PRINTK_H_ */ diff --git a/sys/sys/param.h b/sys/sys/param.h index c63452973daf..d3a6fae783d4 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400018 +#define __FreeBSD_version 1400019 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-main@freebsd.org Mon Jun 7 23:37:14 2021 Return-Path: Delivered-To: dev-commits-src-main@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 8F19665565E; Mon, 7 Jun 2021 23:37:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzVCG3cMTz4m0k; Mon, 7 Jun 2021 23:37:14 +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 51F581E56A; Mon, 7 Jun 2021 23:37:14 +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 157NbEKN060294; Mon, 7 Jun 2021 23:37:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 157NbEVW060293; Mon, 7 Jun 2021 23:37:14 GMT (envelope-from git) Date: Mon, 7 Jun 2021 23:37:14 GMT Message-Id: <202106072337.157NbEVW060293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: 1b602f641a89 - main - linuxkpi: Fix build from redefined pr_err_once() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b602f641a8982e839c74230aeab953901f24d73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 23:37:14 -0000 The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1b602f641a8982e839c74230aeab953901f24d73 commit 1b602f641a8982e839c74230aeab953901f24d73 Author: Neel Chauhan AuthorDate: 2021-06-07 23:37:21 +0000 Commit: Neel Chauhan CommitDate: 2021-06-07 23:37:21 +0000 linuxkpi: Fix build from redefined pr_err_once() --- sys/compat/linuxkpi/common/include/linux/printk.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index ac3fdb9f31ae..e6510e9e9834 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -127,7 +127,4 @@ print_hex_dump_bytes(const char *prefix_str, const int prefix_type, #define pr_info_ratelimited(fmt, ...) \ printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) -#define pr_err_once(fmt, ...) \ - printk_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) - #endif /* _LINUX_PRINTK_H_ */ From owner-dev-commits-src-main@freebsd.org Tue Jun 8 05:18:38 2021 Return-Path: Delivered-To: dev-commits-src-main@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 291C0659754; Tue, 8 Jun 2021 05:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzdnB0h3Nz57Gy; Tue, 8 Jun 2021 05:18:38 +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 0039F22FB6; Tue, 8 Jun 2021 05:18:38 +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 1585IbDI011370; Tue, 8 Jun 2021 05:18:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1585IbC5011369; Tue, 8 Jun 2021 05:18:37 GMT (envelope-from git) Date: Tue, 8 Jun 2021 05:18:37 GMT Message-Id: <202106080518.1585IbC5011369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: f570a6723e14 - main - Fix copyright, remove "all rights reserved". MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f570a6723e145ae585bfb402f3f42260687666d3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 05:18:38 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=f570a6723e145ae585bfb402f3f42260687666d3 commit f570a6723e145ae585bfb402f3f42260687666d3 Author: Dmitry Chagin AuthorDate: 2021-06-08 05:18:00 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-08 05:18:00 +0000 Fix copyright, remove "all rights reserved". The eventfd code was written by me, rdivacky@ copyrigth applicable only to epoll part of the Linuxulator code. Roman is ok to retire his copyright from sys/kern/sys_eventfd.c and 'All rights reserved.' lines from sys/compat/linux/linux_event.[c|h] and sys/kern/sys_eventfd.c files. Reviewed by: kib, emaste Approved by: rdivacky Differential Revision: https://reviews.freebsd.org/D30677 MFC after: 2 weeks --- sys/kern/sys_eventfd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/sys_eventfd.c b/sys/kern/sys_eventfd.c index 3fdb4afc7850..8a884e4c9a55 100644 --- a/sys/kern/sys_eventfd.c +++ b/sys/kern/sys_eventfd.c @@ -1,9 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2007 Roman Divacky * Copyright (c) 2014 Dmitry Chagin - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-dev-commits-src-main@freebsd.org Tue Jun 8 09:09:34 2021 Return-Path: Delivered-To: dev-commits-src-main@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 4552065C30A; Tue, 8 Jun 2021 09:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzkvf1DV4z3kFJ; Tue, 8 Jun 2021 09:09:34 +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 1291626151; Tue, 8 Jun 2021 09:09:34 +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 15899XrA014834; Tue, 8 Jun 2021 09:09:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15899XEk014833; Tue, 8 Jun 2021 09:09:33 GMT (envelope-from git) Date: Tue, 8 Jun 2021 09:09:33 GMT Message-Id: <202106080909.15899XEk014833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 2362ad457a01 - main - linux: implement statx(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2362ad457a01d56d87e74823599578ab37bdbfb9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 09:09:34 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=2362ad457a01d56d87e74823599578ab37bdbfb9 commit 2362ad457a01d56d87e74823599578ab37bdbfb9 Author: Philippe Michaud-Boudreault AuthorDate: 2021-06-08 08:24:10 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-08 09:08:56 +0000 linux: implement statx(2) PR: 252106 Reviewed By: dchagin Differential Revision: https://reviews.freebsd.org/D30466 --- sys/compat/linux/linux.h | 42 ++++++++++++++++++++++++++ sys/compat/linux/linux_dummy.c | 2 -- sys/compat/linux/linux_stats.c | 67 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 48217959951c..18eafa88a432 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -205,4 +205,46 @@ int linux_to_bsd_bits_(int value, struct bsd_to_linux_bitmap *bitmap, int bsd_to_linux_errno(int error); void linux_check_errtbl(void); +#define STATX_BASIC_STATS 0x07ff +#define STATX_BTIME 0x0800 +#define STATX_ALL 0x0fff + +#define STATX_ATTR_COMPRESSED 0x0004 +#define STATX_ATTR_IMMUTABLE 0x0010 +#define STATX_ATTR_APPEND 0x0020 +#define STATX_ATTR_NODUMP 0x0040 +#define STATX_ATTR_ENCRYPTED 0x0800 +#define STATX_ATTR_AUTOMOUNT 0x1000 + +struct l_statx_timestamp { + int64_t tv_sec; + int32_t tv_nsec; + int32_t __spare0; +}; + +struct l_statx { + uint32_t stx_mask; + uint32_t stx_blksize; + uint64_t stx_attributes; + uint32_t stx_nlink; + uint32_t stx_uid; + uint32_t stx_gid; + uint16_t stx_mode; + uint16_t __spare0[1]; + uint64_t stx_ino; + uint64_t stx_size; + uint64_t stx_blocks; + uint64_t stx_attributes_mask; + struct l_statx_timestamp stx_atime; + struct l_statx_timestamp stx_btime; + struct l_statx_timestamp stx_ctime; + struct l_statx_timestamp stx_mtime; + uint32_t stx_rdev_major; + uint32_t stx_rdev_minor; + uint32_t stx_dev_major; + uint32_t stx_dev_minor; + uint64_t stx_mnt_id; + uint64_t __spare2[13]; +}; + #endif /* _LINUX_MI_H_ */ diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index fef09809822b..aa579d762c93 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -147,8 +147,6 @@ DUMMY(faccessat2); DUMMY(process_madvise); DUMMY(epoll_pwait2); DUMMY(mount_setattr); -/* Linux 4.11: */ -DUMMY(statx); /* Linux 4.18: */ DUMMY(io_pgetevents); DUMMY(rseq); diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index c88f6f53bdd7..4e6304500a8b 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -196,6 +196,40 @@ newstat_copyout(struct stat *buf, void *ubuf) return (copyout(&tbuf, ubuf, sizeof(tbuf))); } +static int +statx_copyout(struct stat *buf, void *ubuf) +{ + struct l_statx tbuf; + + bzero(&tbuf, sizeof(tbuf)); + tbuf.stx_mask = STATX_ALL; + tbuf.stx_blksize = buf->st_blksize; + tbuf.stx_attributes = 0; + tbuf.stx_nlink = buf->st_nlink; + tbuf.stx_uid = buf->st_uid; + tbuf.stx_gid = buf->st_gid; + tbuf.stx_mode = buf->st_mode; + tbuf.stx_ino = buf->st_ino; + tbuf.stx_size = buf->st_size; + tbuf.stx_blocks = buf->st_blocks; + + tbuf.stx_atime.tv_sec = buf->st_atim.tv_sec; + tbuf.stx_atime.tv_nsec = buf->st_atim.tv_nsec; + tbuf.stx_btime.tv_sec = buf->st_birthtim.tv_sec; + tbuf.stx_btime.tv_nsec = buf->st_birthtim.tv_nsec; + tbuf.stx_ctime.tv_sec = buf->st_ctim.tv_sec; + tbuf.stx_ctime.tv_nsec = buf->st_ctim.tv_nsec; + tbuf.stx_mtime.tv_sec = buf->st_mtim.tv_sec; + tbuf.stx_mtime.tv_nsec = buf->st_mtim.tv_nsec; + + tbuf.stx_rdev_major = buf->st_rdev >> 8; + tbuf.stx_rdev_minor = buf->st_rdev & 0xff; + tbuf.stx_dev_major = buf->st_dev >> 8; + tbuf.stx_dev_minor = buf->st_dev & 0xff; + + return (copyout(&tbuf, ubuf, sizeof(tbuf))); +} + #ifdef LINUX_LEGACY_SYSCALLS int linux_newstat(struct thread *td, struct linux_newstat_args *args) @@ -730,3 +764,36 @@ linux_syncfs(struct thread *td, struct linux_syncfs_args *args) vrele(vp); return (error); } + +int +linux_statx(struct thread *td, struct linux_statx_args *args) +{ + char *path; + int error, dirfd, flags; + struct stat buf; + + if (args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH)) { + linux_msg(td, "statx unsupported flags 0x%x", args->flags); + return (EINVAL); + } + + flags = (args->flags & LINUX_AT_SYMLINK_NOFOLLOW) ? + AT_SYMLINK_NOFOLLOW : 0; + flags |= (args->flags & LINUX_AT_EMPTY_PATH) ? + AT_EMPTY_PATH : 0; + + dirfd = (args->dirfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dirfd; + if (!LUSECONVPATH(td)) { + error = linux_kern_statat(td, flags, dirfd, args->pathname, + UIO_USERSPACE, &buf); + } else { + LCONVPATHEXIST_AT(td, args->pathname, &path, dirfd); + error = linux_kern_statat(td, flags, dirfd, path, UIO_SYSSPACE, &buf); + LFREEPATH(path); + } + if (error == 0) + error = statx_copyout(&buf, args->statxbuf); + + return (error); +} + From owner-dev-commits-src-main@freebsd.org Tue Jun 8 09:20:50 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D1B9465C524; Tue, 8 Jun 2021 09:20:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzl8f5cPyz3lBf; Tue, 8 Jun 2021 09:20:50 +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 A8B6C26071; Tue, 8 Jun 2021 09:20:50 +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 1589Ko6T036680; Tue, 8 Jun 2021 09:20:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1589KoGY036679; Tue, 8 Jun 2021 09:20:50 GMT (envelope-from git) Date: Tue, 8 Jun 2021 09:20:50 GMT Message-Id: <202106080920.1589KoGY036679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: f102b61d0ecf - main - linux: make sure to zero the l_siginfo structure for ptrace(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f102b61d0ecffc6d9cc322fa7a48e0927391421b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 09:20:50 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=f102b61d0ecffc6d9cc322fa7a48e0927391421b commit f102b61d0ecffc6d9cc322fa7a48e0927391421b Author: Edward Tomasz Napierala AuthorDate: 2021-06-08 09:18:29 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-08 09:18:29 +0000 linux: make sure to zero the l_siginfo structure for ptrace(2) Reported By: dchagin Sponsored By: EPSRC --- sys/amd64/linux/linux_ptrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index 32d736d49095..67d8b121fbf1 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -379,6 +379,7 @@ linux_ptrace_getsiginfo(struct thread *td, pid_t pid, l_ulong data) } sig = bsd_to_linux_signal(lwpinfo.pl_siginfo.si_signo); + memset(&l_siginfo, 0, sizeof(l_siginfo)); siginfo_to_lsiginfo(&lwpinfo.pl_siginfo, &l_siginfo, sig); error = copyout(&l_siginfo, (void *)data, sizeof(l_siginfo)); return (error); From owner-dev-commits-src-main@freebsd.org Tue Jun 8 10:49:49 2021 Return-Path: Delivered-To: dev-commits-src-main@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 4515065D379; Tue, 8 Jun 2021 10:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzn7K1Xkxz4RwX; Tue, 8 Jun 2021 10:49:49 +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 1D3CD273EF; Tue, 8 Jun 2021 10:49:49 +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 158AnnJ8048664; Tue, 8 Jun 2021 10:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158Ann8V048663; Tue, 8 Jun 2021 10:49:49 GMT (envelope-from git) Date: Tue, 8 Jun 2021 10:49:49 GMT Message-Id: <202106081049.158Ann8V048663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 09307dbfb888 - main - tests/netgraph: Allow receiving answers to messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09307dbfb888a98232096c751a96ecb3344aa77c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 10:49:49 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=09307dbfb888a98232096c751a96ecb3344aa77c commit 09307dbfb888a98232096c751a96ecb3344aa77c Author: Lutz Donnerhacke AuthorDate: 2021-06-05 22:37:22 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-08 10:49:04 +0000 tests/netgraph: Allow receiving answers to messages Add msg_handler in order to receive messages from netgraph nodes to be tested. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30657 --- tests/sys/netgraph/util.c | 17 ++++++++++++----- tests/sys/netgraph/util.h | 2 ++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/sys/netgraph/util.c b/tests/sys/netgraph/util.c index 37d005393e91..450a176971a7 100644 --- a/tests/sys/netgraph/util.c +++ b/tests/sys/netgraph/util.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -59,9 +58,10 @@ struct data_handler { SLIST_ENTRY(data_handler) next; }; static SLIST_HEAD(, data_handler) data_head = SLIST_HEAD_INITIALIZER(data_head); +static ng_msg_handler_t msg_handler = NULL; static void handle_data(void *ctx); -static void handle_msg(void); +static void handle_msg(void *ctx); void ng_connect(char const *path1, char const *hook1, @@ -143,14 +143,21 @@ ng_send_data(char const *hook, CHECK(, -1 != NgSendData(ds, hook, data, len)); } +void +ng_register_msg(ng_msg_handler_t proc) { + msg_handler = proc; +} + static void -handle_msg(void) { +handle_msg(void *ctx) { struct ng_mesg *m; char path[NG_PATHSIZ]; ATF_REQUIRE(-1 != NgAllocRecvMsg(cs, &m, path)); - printf("Got message from %s\n", path); + if(msg_handler != NULL) + (*msg_handler)(path, m, ctx); + free(m); } @@ -191,7 +198,7 @@ retry: return 0; default: /* something to do */ if (FD_ISSET(cs, &fds)) - handle_msg(); + handle_msg(context); if (FD_ISSET(ds, &fds)) handle_data(context); return 1; diff --git a/tests/sys/netgraph/util.h b/tests/sys/netgraph/util.h index 73afa5a24805..93ddc91f79bc 100644 --- a/tests/sys/netgraph/util.h +++ b/tests/sys/netgraph/util.h @@ -46,6 +46,8 @@ typedef void (*ng_data_handler_t)(void *, size_t, void *ctx); void ng_register_data(char const *hook, ng_data_handler_t proc); void ng_send_data(char const *hook, void const *, size_t); +typedef void (*ng_msg_handler_t)(char const *, struct ng_mesg *, void *); +void ng_register_msg(ng_msg_handler_t proc); int ng_send_msg(char const *path, char const *msg); int ng_handle_event (unsigned int ms, void *ctx); From owner-dev-commits-src-main@freebsd.org Tue Jun 8 11:03:36 2021 Return-Path: Delivered-To: dev-commits-src-main@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 23FCB65D3DB; Tue, 8 Jun 2021 11:03:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FznRD0KtQz4T26; Tue, 8 Jun 2021 11:03: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 E7941279E7; Tue, 8 Jun 2021 11:03: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 158B3ZB5075468; Tue, 8 Jun 2021 11:03:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158B3ZuE075467; Tue, 8 Jun 2021 11:03:35 GMT (envelope-from git) Date: Tue, 8 Jun 2021 11:03:35 GMT Message-Id: <202106081103.158B3ZuE075467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Grehan Subject: git: 054accac71e0 - main - Add a virtio-input device emulation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 054accac71e0944ab588c3ab052bea6947df7885 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 11:03:36 -0000 The branch main has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=054accac71e0944ab588c3ab052bea6947df7885 commit 054accac71e0944ab588c3ab052bea6947df7885 Author: Corvin Köhne AuthorDate: 2021-06-08 08:56:43 +0000 Commit: Peter Grehan CommitDate: 2021-06-08 09:05:09 +0000 Add a virtio-input device emulation. This will be used to inject keyboard/mouse input events into a guest. The command line syntax is: -s ,virtio-input,/dev/input/eventX Reviewed by: jhb (bhyve), grehan Obtained from: Corvin Köhne MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D30020 --- usr.sbin/bhyve/Makefile | 1 + usr.sbin/bhyve/bhyve.8 | 10 + usr.sbin/bhyve/bhyve_config.5 | 11 + usr.sbin/bhyve/pci_virtio_input.c | 782 ++++++++++++++++++++++++++++++++++++++ usr.sbin/bhyve/virtio.c | 10 +- usr.sbin/bhyve/virtio.h | 16 + 6 files changed, 828 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index e35d528ab605..772c0988090e 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -50,6 +50,7 @@ SRCS= \ pci_virtio_9p.c \ pci_virtio_block.c \ pci_virtio_console.c \ + pci_virtio_input.c \ pci_virtio_net.c \ pci_virtio_rnd.c \ pci_virtio_scsi.c \ diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 79b6d9bfb240..fcf47ec65513 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -306,6 +306,8 @@ Virtio RNG interface. Virtio console interface, which exposes multiple ports to the guest in the form of simple char devices for simple IO between the guest and host userspaces. +.It Cm virtio-input +Virtio input interface. .It Cm ahci AHCI controller attached to arbitrary devices. .It Cm ahci-cd @@ -539,6 +541,14 @@ resize at present. Emergency write is advertised, but no-op at present. .El .Pp +Virtio input device backends: +.Bl -tag -width 10n +.It Ar /dev/input/eventX +Send input events of +.Ar /dev/input/eventX +to guest by VirtIO Input Interface. +.El +.Pp Framebuffer devices backends: .Bl -bullet .Sm off diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 1a77b1bbacb4..a2221d5bc4bf 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -221,6 +221,8 @@ VirtIO 9p (VirtFS) interface. VirtIO block storage interface. .It Li virtio-console VirtIO console interface. +.It Li virtio-input +VirtIO input interface. .It Li virtio-net VirtIO network interface. .It Li virtio-rnd @@ -528,6 +530,15 @@ The name of the port exposed to the guest. .It Va path Ta path Ta Ta The path of a UNIX domain socket providing the host connection for the port. .El +.Ss VirtIO Input Interface Settings +Each VirtIO Input device contains one input event device. +All input events of the input event device are send to the guest by VirtIO Input interface. +VirtIO Input Interfaces support the following variables: +.Bl -column "Name" "Format" "Default" +.It Sy Name Ta Sy Format Ta Sy Default Ta Sy Description +.It Va path Ta path Ta Ta +The path of the input event device exposed to the guest +.El .Ss VirtIO Network Interface Settings In addition to the network backend settings, VirtIO network interfaces support the following variables: diff --git a/usr.sbin/bhyve/pci_virtio_input.c b/usr.sbin/bhyve/pci_virtio_input.c new file mode 100644 index 000000000000..4517333b1603 --- /dev/null +++ b/usr.sbin/bhyve/pci_virtio_input.c @@ -0,0 +1,782 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * virtio input device emulation. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#ifndef WITHOUT_CAPSICUM +#include + +#include +#endif +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bhyverun.h" +#include "config.h" +#include "debug.h" +#include "mevent.h" +#include "pci_emul.h" +#include "virtio.h" + +#define VTINPUT_RINGSZ 64 + +#define VTINPUT_MAX_PKT_LEN 10 + +/* + * Queue definitions. + */ +#define VTINPUT_EVENTQ 0 +#define VTINPUT_STATUSQ 1 + +#define VTINPUT_MAXQ 2 + +static int pci_vtinput_debug; +#define DPRINTF(params) \ + if (pci_vtinput_debug) \ + PRINTLN params +#define WPRINTF(params) PRINTLN params + +enum vtinput_config_select { + VTINPUT_CFG_UNSET = 0x00, + VTINPUT_CFG_ID_NAME = 0x01, + VTINPUT_CFG_ID_SERIAL = 0x02, + VTINPUT_CFG_ID_DEVIDS = 0x03, + VTINPUT_CFG_PROP_BITS = 0x10, + VTINPUT_CFG_EV_BITS = 0x11, + VTINPUT_CFG_ABS_INFO = 0x12 +}; + +struct vtinput_absinfo { + uint32_t min; + uint32_t max; + uint32_t fuzz; + uint32_t flat; + uint32_t res; +} __packed; + +struct vtinput_devids { + uint16_t bustype; + uint16_t vendor; + uint16_t product; + uint16_t version; +} __packed; + +struct vtinput_config { + uint8_t select; + uint8_t subsel; + uint8_t size; + uint8_t reserved[5]; + union { + char string[128]; + uint8_t bitmap[128]; + struct vtinput_absinfo abs; + struct vtinput_devids ids; + } u; +} __packed; + +struct vtinput_event { + uint16_t type; + uint16_t code; + uint32_t value; +} __packed; + +struct vtinput_event_elem { + struct vtinput_event event; + struct iovec iov; + uint16_t idx; +}; + +struct vtinput_eventqueue { + struct vtinput_event_elem *events; + uint32_t size; + uint32_t idx; +}; + +/* + * Per-device softc + */ +struct pci_vtinput_softc { + struct virtio_softc vsc_vs; + struct vqueue_info vsc_queues[VTINPUT_MAXQ]; + pthread_mutex_t vsc_mtx; + const char *vsc_evdev; + int vsc_fd; + struct vtinput_config vsc_config; + int vsc_config_valid; + struct mevent *vsc_evp; + struct vtinput_eventqueue vsc_eventqueue; +}; + +static void pci_vtinput_reset(void *); +static int pci_vtinput_cfgread(void *, int, int, uint32_t *); +static int pci_vtinput_cfgwrite(void *, int, int, uint32_t); + +static struct virtio_consts vtinput_vi_consts = { + "vtinput", /* our name */ + VTINPUT_MAXQ, /* we support 1 virtqueue */ + sizeof(struct vtinput_config), /* config reg size */ + pci_vtinput_reset, /* reset */ + NULL, /* device-wide qnotify -- not used */ + pci_vtinput_cfgread, /* read virtio config */ + pci_vtinput_cfgwrite, /* write virtio config */ + NULL, /* apply negotiated features */ + 0, /* our capabilities */ +}; + +static void +pci_vtinput_reset(void *vsc) +{ + struct pci_vtinput_softc *sc = vsc; + + DPRINTF(("%s: device reset requested", __func__)); + vi_reset_dev(&sc->vsc_vs); +} + +static void +pci_vtinput_notify_eventq(void *vsc, struct vqueue_info *vq) +{ + DPRINTF(("%s", __func__)); +} + +static void +pci_vtinput_notify_statusq(void *vsc, struct vqueue_info *vq) +{ + struct pci_vtinput_softc *sc = vsc; + + while (vq_has_descs(vq)) { + /* get descriptor chain */ + struct iovec iov; + struct vi_req req; + const int n = vq_getchain(vq, &iov, 1, &req); + if (n <= 0) { + WPRINTF(("%s: invalid descriptor: %d", __func__, n)); + return; + } + + /* get event */ + struct vtinput_event event; + memcpy(&event, iov.iov_base, sizeof(event)); + + /* + * on multi touch devices: + * - host send EV_MSC to guest + * - guest sends EV_MSC back to host + * - host writes EV_MSC to evdev + * - evdev saves EV_MSC in it's event buffer + * - host receives an extra EV_MSC by reading the evdev event + * buffer + * - frames become larger and larger + * avoid endless loops by ignoring EV_MSC + */ + if (event.type == EV_MSC) { + vq_relchain(vq, req.idx, sizeof(event)); + continue; + } + + /* send event to evdev */ + struct input_event host_event; + host_event.type = event.type; + host_event.code = event.code; + host_event.value = event.value; + if (gettimeofday(&host_event.time, NULL) != 0) { + WPRINTF(("%s: failed gettimeofday", __func__)); + } + if (write(sc->vsc_fd, &host_event, sizeof(host_event)) == -1) { + WPRINTF(("%s: failed to write host_event", __func__)); + } + + vq_relchain(vq, req.idx, sizeof(event)); + } + vq_endchains(vq, 1); +} + +static int +pci_vtinput_get_bitmap(struct pci_vtinput_softc *sc, int cmd, int count) +{ + if (count <= 0 || !sc) { + return (-1); + } + + /* query bitmap */ + memset(sc->vsc_config.u.bitmap, 0, sizeof(sc->vsc_config.u.bitmap)); + if (ioctl(sc->vsc_fd, cmd, sc->vsc_config.u.bitmap) < 0) { + return (-1); + } + + /* get number of set bytes in bitmap */ + for (int i = count - 1; i >= 0; i--) { + if (sc->vsc_config.u.bitmap[i]) { + return i + 1; + } + } + + return (-1); +} + +static int +pci_vtinput_read_config_id_name(struct pci_vtinput_softc *sc) +{ + char name[128]; + if (ioctl(sc->vsc_fd, EVIOCGNAME(sizeof(name) - 1), name) < 0) { + return (1); + } + + memcpy(sc->vsc_config.u.string, name, sizeof(name)); + sc->vsc_config.size = strnlen(name, sizeof(name)); + + return (0); +} + +static int +pci_vtinput_read_config_id_serial(struct pci_vtinput_softc *sc) +{ + /* serial isn't supported */ + sc->vsc_config.size = 0; + + return (0); +} + +static int +pci_vtinput_read_config_id_devids(struct pci_vtinput_softc *sc) +{ + struct input_id devids; + if (ioctl(sc->vsc_fd, EVIOCGID, &devids)) { + return (1); + } + + sc->vsc_config.u.ids.bustype = devids.bustype; + sc->vsc_config.u.ids.vendor = devids.vendor; + sc->vsc_config.u.ids.product = devids.product; + sc->vsc_config.u.ids.version = devids.version; + sc->vsc_config.size = sizeof(struct vtinput_devids); + + return (0); +} + +static int +pci_vtinput_read_config_prop_bits(struct pci_vtinput_softc *sc) +{ + /* + * Evdev bitmap countains 1 bit per count. Additionally evdev bitmaps + * are arrays of longs instead of chars. Calculate how many longs are + * required for evdev bitmap. Multiply that with sizeof(long) to get the + * number of elements. + */ + const int count = howmany(INPUT_PROP_CNT, sizeof(long) * 8) * + sizeof(long); + const unsigned int cmd = EVIOCGPROP(count); + const int size = pci_vtinput_get_bitmap(sc, cmd, count); + if (size <= 0) { + return (1); + } + + sc->vsc_config.size = size; + + return (0); +} + +static int +pci_vtinput_read_config_ev_bits(struct pci_vtinput_softc *sc, uint8_t type) +{ + int count; + + switch (type) { + case EV_KEY: + count = KEY_CNT; + break; + case EV_REL: + count = REL_CNT; + break; + case EV_ABS: + count = ABS_CNT; + break; + case EV_MSC: + count = MSC_CNT; + break; + case EV_SW: + count = SW_CNT; + break; + case EV_LED: + count = LED_CNT; + break; + default: + return (1); + } + + /* + * Evdev bitmap countains 1 bit per count. Additionally evdev bitmaps + * are arrays of longs instead of chars. Calculate how many longs are + * required for evdev bitmap. Multiply that with sizeof(long) to get the + * number of elements. + */ + count = howmany(count, sizeof(long) * 8) * sizeof(long); + const unsigned int cmd = EVIOCGBIT(sc->vsc_config.subsel, count); + const int size = pci_vtinput_get_bitmap(sc, cmd, count); + if (size <= 0) { + return (1); + } + + sc->vsc_config.size = size; + + return (0); +} + +static int +pci_vtinput_read_config_abs_info(struct pci_vtinput_softc *sc) +{ + /* check if evdev has EV_ABS */ + if (!pci_vtinput_read_config_ev_bits(sc, EV_ABS)) { + return (1); + } + + /* get abs information */ + struct input_absinfo abs; + if (ioctl(sc->vsc_fd, EVIOCGABS(sc->vsc_config.subsel), &abs) < 0) { + return (1); + } + + /* save abs information */ + sc->vsc_config.u.abs.min = abs.minimum; + sc->vsc_config.u.abs.max = abs.maximum; + sc->vsc_config.u.abs.fuzz = abs.fuzz; + sc->vsc_config.u.abs.flat = abs.flat; + sc->vsc_config.u.abs.res = abs.resolution; + sc->vsc_config.size = sizeof(struct vtinput_absinfo); + + return (0); +} + +static int +pci_vtinput_read_config(struct pci_vtinput_softc *sc) +{ + switch (sc->vsc_config.select) { + case VTINPUT_CFG_UNSET: + return (0); + case VTINPUT_CFG_ID_NAME: + return pci_vtinput_read_config_id_name(sc); + case VTINPUT_CFG_ID_SERIAL: + return pci_vtinput_read_config_id_serial(sc); + case VTINPUT_CFG_ID_DEVIDS: + return pci_vtinput_read_config_id_devids(sc); + case VTINPUT_CFG_PROP_BITS: + return pci_vtinput_read_config_prop_bits(sc); + case VTINPUT_CFG_EV_BITS: + return pci_vtinput_read_config_ev_bits( + sc, sc->vsc_config.subsel); + case VTINPUT_CFG_ABS_INFO: + return pci_vtinput_read_config_abs_info(sc); + default: + return (1); + } +} + +static int +pci_vtinput_cfgread(void *vsc, int offset, int size, uint32_t *retval) +{ + struct pci_vtinput_softc *sc = vsc; + + /* check for valid offset and size */ + if (offset + size > sizeof(struct vtinput_config)) { + WPRINTF(("%s: read to invalid offset/size %d/%d", __func__, + offset, size)); + memset(retval, 0, size); + return (0); + } + + /* read new config values, if select and subsel changed. */ + if (!sc->vsc_config_valid) { + if (pci_vtinput_read_config(sc) != 0) { + DPRINTF(("%s: could not read config %d/%d", __func__, + sc->vsc_config.select, sc->vsc_config.subsel)); + memset(retval, 0, size); + return (0); + } + sc->vsc_config_valid = 1; + } + + uint8_t *ptr = (uint8_t *)&sc->vsc_config; + memcpy(retval, ptr + offset, size); + + return (0); +} + +static int +pci_vtinput_cfgwrite(void *vsc, int offset, int size, uint32_t value) +{ + struct pci_vtinput_softc *sc = vsc; + + /* guest can only write to select and subsel fields */ + if (offset + size > 2) { + WPRINTF(("%s: write to readonly reg %d", __func__, offset)); + return (1); + } + + /* copy value into config */ + uint8_t *ptr = (uint8_t *)&sc->vsc_config; + memcpy(ptr + offset, &value, size); + + /* select/subsel changed, query new config on next cfgread */ + sc->vsc_config_valid = 0; + + return (0); +} + +static int +vtinput_eventqueue_add_event( + struct vtinput_eventqueue *queue, struct input_event *e) +{ + /* check if queue is full */ + if (queue->idx >= queue->size) { + /* alloc new elements for queue */ + const uint32_t newSize = queue->idx; + const void *newPtr = realloc(queue->events, + queue->size * sizeof(struct vtinput_event_elem)); + if (newPtr == NULL) { + WPRINTF(("%s: realloc memory for eventqueue failed!", + __func__)); + return (1); + } + /* save new size and eventqueue */ + queue->events = (struct vtinput_event_elem *)newPtr; + queue->size = newSize; + } + + /* save event */ + struct vtinput_event *event = &queue->events[queue->idx].event; + event->type = e->type; + event->code = e->code; + event->value = e->value; + queue->idx++; + + return (0); +} + +static void +vtinput_eventqueue_clear(struct vtinput_eventqueue *queue) +{ + /* just reset index to clear queue */ + queue->idx = 0; +} + +static void +vtinput_eventqueue_send_events( + struct vtinput_eventqueue *queue, struct vqueue_info *vq) +{ + /* + * First iteration through eventqueue: + * Get descriptor chains. + */ + for (uint32_t i = 0; i < queue->idx; ++i) { + /* get descriptor */ + if (!vq_has_descs(vq)) { + /* + * We don't have enough descriptors for all events. + * Return chains back to guest. + */ + vq_retchains(vq, i); + WPRINTF(( + "%s: not enough available descriptors, dropping %d events", + __func__, queue->idx)); + goto done; + } + + /* get descriptor chain */ + struct iovec iov; + struct vi_req req; + const int n = vq_getchain(vq, &iov, 1, &req); + if (n <= 0) { + WPRINTF(("%s: invalid descriptor: %d", __func__, n)); + return; + } + if (n != 1) { + WPRINTF( + ("%s: invalid number of descriptors in chain: %d", + __func__, n)); + /* release invalid chain */ + vq_relchain(vq, req.idx, 0); + return; + } + if (iov.iov_len < sizeof(struct vtinput_event)) { + WPRINTF(("%s: invalid descriptor length: %lu", __func__, + iov.iov_len)); + /* release invalid chain */ + vq_relchain(vq, req.idx, 0); + return; + } + + /* save descriptor */ + queue->events[i].iov = iov; + queue->events[i].idx = req.idx; + } + + /* + * Second iteration through eventqueue: + * Send events to guest by releasing chains + */ + for (uint32_t i = 0; i < queue->idx; ++i) { + struct vtinput_event_elem event = queue->events[i]; + memcpy(event.iov.iov_base, &event.event, + sizeof(struct vtinput_event)); + vq_relchain(vq, event.idx, sizeof(struct vtinput_event)); + } +done: + /* clear queue and send interrupt to guest */ + vtinput_eventqueue_clear(queue); + vq_endchains(vq, 1); + + return; +} + +static int +vtinput_read_event_from_host(int fd, struct input_event *event) +{ + const int len = read(fd, event, sizeof(struct input_event)); + if (len != sizeof(struct input_event)) { + if (len == -1 && errno != EAGAIN) { + WPRINTF(("%s: event read failed! len = %d, errno = %d", + __func__, len, errno)); + } + + /* host doesn't have more events for us */ + return (1); + } + + return (0); +} + +static void +vtinput_read_event(int fd __attribute((unused)), + enum ev_type t __attribute__((unused)), void *arg __attribute__((unused))) +{ + struct pci_vtinput_softc *sc = arg; + + /* skip if driver isn't ready */ + if (!(sc->vsc_vs.vs_status & VIRTIO_CONFIG_STATUS_DRIVER_OK)) + return; + + /* read all events from host */ + struct input_event event; + while (vtinput_read_event_from_host(sc->vsc_fd, &event) == 0) { + /* add events to our queue */ + vtinput_eventqueue_add_event(&sc->vsc_eventqueue, &event); + + /* only send events to guest on EV_SYN or SYN_REPORT */ + if (event.type != EV_SYN || event.type != SYN_REPORT) { + continue; + } + + /* send host events to guest */ + vtinput_eventqueue_send_events( + &sc->vsc_eventqueue, &sc->vsc_queues[VTINPUT_EVENTQ]); + } +} + +static int +pci_vtinput_legacy_config(nvlist_t *nvl, const char *opts) +{ + if (opts == NULL) + return (-1); + + /* + * parse opts: + * virtio-input,/dev/input/eventX + */ + char *cp = strchr(opts, ','); + if (cp == NULL) { + set_config_value_node(nvl, "path", opts); + return (0); + } + char *path = strndup(opts, cp - opts); + set_config_value_node(nvl, "path", path); + free(path); + + return (pci_parse_legacy_config(nvl, cp + 1)); +} + +static int +pci_vtinput_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +{ + struct pci_vtinput_softc *sc; + + /* + * Keep it here. + * Else it's possible to access it uninitialized by jumping to failed. + */ + pthread_mutexattr_t mtx_attr = NULL; + + sc = calloc(1, sizeof(struct pci_vtinput_softc)); + + sc->vsc_evdev = get_config_value_node(nvl, "path"); + if (sc->vsc_evdev == NULL) { + WPRINTF(("%s: missing required path config value", __func__)); + goto failed; + } + + /* + * open evdev by using non blocking I/O: + * read from /dev/input/eventX would block our thread otherwise + */ + sc->vsc_fd = open(sc->vsc_evdev, O_RDWR | O_NONBLOCK); + if (sc->vsc_fd < 0) { + WPRINTF(("%s: failed to open %s", __func__, sc->vsc_evdev)); + goto failed; + } + + /* check if evdev is really a evdev */ + int evversion; + int error = ioctl(sc->vsc_fd, EVIOCGVERSION, &evversion); + if (error < 0) { + WPRINTF(("%s: %s is no evdev", __func__, sc->vsc_evdev)); + goto failed; + } + + /* gain exclusive access to evdev */ + error = ioctl(sc->vsc_fd, EVIOCGRAB, 1); + if (error < 0) { + WPRINTF(("%s: failed to grab %s", __func__, sc->vsc_evdev)); + goto failed; + } + + if (pthread_mutexattr_init(&mtx_attr)) { + WPRINTF(("%s: init mutexattr failed", __func__)); + goto failed; + } + if (pthread_mutexattr_settype(&mtx_attr, PTHREAD_MUTEX_RECURSIVE)) { + WPRINTF(("%s: settype mutexattr failed", __func__)); + goto failed; + } + if (pthread_mutex_init(&sc->vsc_mtx, &mtx_attr)) { + WPRINTF(("%s: init mutex failed", __func__)); + goto failed; + } + + /* init softc */ + sc->vsc_eventqueue.idx = 0; + sc->vsc_eventqueue.size = VTINPUT_MAX_PKT_LEN; + sc->vsc_eventqueue.events = calloc( + sc->vsc_eventqueue.size, sizeof(struct vtinput_event_elem)); + sc->vsc_config_valid = 0; + if (sc->vsc_eventqueue.events == NULL) { + WPRINTF(("%s: failed to alloc eventqueue", __func__)); + goto failed; + } + + /* register event handler */ + sc->vsc_evp = mevent_add(sc->vsc_fd, EVF_READ, vtinput_read_event, sc); + if (sc->vsc_evp == NULL) { + WPRINTF(("%s: could not register mevent", __func__)); + goto failed; + } + +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; + cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ, CAP_WRITE); + if (caph_rights_limit(sc->vsc_fd, &rights) == -1) { + errx(EX_OSERR, "Unable to apply rights for sandbox"); + } +#endif + + /* link virtio to softc */ + vi_softc_linkup( + &sc->vsc_vs, &vtinput_vi_consts, sc, pi, sc->vsc_queues); + sc->vsc_vs.vs_mtx = &sc->vsc_mtx; + + /* init virtio queues */ + sc->vsc_queues[VTINPUT_EVENTQ].vq_qsize = VTINPUT_RINGSZ; + sc->vsc_queues[VTINPUT_EVENTQ].vq_notify = pci_vtinput_notify_eventq; + sc->vsc_queues[VTINPUT_STATUSQ].vq_qsize = VTINPUT_RINGSZ; + sc->vsc_queues[VTINPUT_STATUSQ].vq_notify = pci_vtinput_notify_statusq; + + /* initialize config space */ + pci_set_cfgdata16(pi, PCIR_DEVICE, VIRTIO_DEV_INPUT); + pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); + pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_INPUTDEV); + pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_INPUTDEV_OTHER); + pci_set_cfgdata8(pi, PCIR_REVID, VIRTIO_REV_INPUT); + pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_SUBDEV_INPUT); + pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_SUBVEN_INPUT); + + /* add MSI-X table BAR */ + if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) + goto failed; + /* add virtio register */ + vi_set_io_bar(&sc->vsc_vs, 0); + + return (0); + +failed: + if (sc == NULL) { + return (-1); + } + + if (sc->vsc_evp) + mevent_delete(sc->vsc_evp); + if (sc->vsc_eventqueue.events) + free(sc->vsc_eventqueue.events); + if (sc->vsc_mtx) + pthread_mutex_destroy(&sc->vsc_mtx); + if (mtx_attr) + pthread_mutexattr_destroy(&mtx_attr); + if (sc->vsc_fd) + close(sc->vsc_fd); + + free(sc); + + return (-1); +} + +struct pci_devemu pci_de_vinput = { + .pe_emu = "virtio-input", + .pe_init = pci_vtinput_init, + .pe_legacy_config = pci_vtinput_legacy_config, + .pe_barwrite = vi_pci_write, + .pe_barread = vi_pci_read, +}; +PCI_EMUL_SET(pci_de_vinput); diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index 7f0485cbb826..a08964e28563 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -603,7 +603,10 @@ vi_pci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, max = vc->vc_cfgsize ? vc->vc_cfgsize : 0x100000000; if (newoff + size > max) goto bad; - error = (*vc->vc_cfgread)(DEV_SOFTC(vs), newoff, size, &value); + if (vc->vc_cfgread != NULL) + error = (*vc->vc_cfgread)(DEV_SOFTC(vs), newoff, size, &value); + else + error = 0; if (!error) goto done; } @@ -719,7 +722,10 @@ vi_pci_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, max = vc->vc_cfgsize ? vc->vc_cfgsize : 0x100000000; if (newoff + size > max) goto bad; - error = (*vc->vc_cfgwrite)(DEV_SOFTC(vs), newoff, size, value); + if (vc->vc_cfgwrite != NULL) + error = (*vc->vc_cfgwrite)(DEV_SOFTC(vs), newoff, size, value); + else + error = 0; if (!error) goto done; } diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h index e03fd5f710d1..4c7b9de83125 100644 --- a/usr.sbin/bhyve/virtio.h +++ b/usr.sbin/bhyve/virtio.h @@ -171,6 +171,22 @@ #define VIRTIO_DEV_RANDOM 0x1005 #define VIRTIO_DEV_SCSI 0x1008 #define VIRTIO_DEV_9P 0x1009 +#define VIRTIO_DEV_INPUT 0x1052 + +/* + * PCI revision IDs + */ +#define VIRTIO_REV_INPUT 1 + +/* + * PCI subvendor IDs + */ +#define VIRTIO_SUBVEN_INPUT 0x108E + +/* + * PCI subdevice IDs + */ +#define VIRTIO_SUBDEV_INPUT 0x1100 /* From section 2.3, "Virtqueue Configuration", of the virtio specification */ static inline int From owner-dev-commits-src-main@freebsd.org Tue Jun 8 11:31:12 2021 Return-Path: Delivered-To: dev-commits-src-main@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 39D6365DED7; Tue, 8 Jun 2021 11:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzp3418Gjz4XYS; Tue, 8 Jun 2021 11:31: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 0F87318A; Tue, 8 Jun 2021 11:31: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 158BVCrg011292; Tue, 8 Jun 2021 11:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158BVCYW011291; Tue, 8 Jun 2021 11:31:12 GMT (envelope-from git) Date: Tue, 8 Jun 2021 11:31:12 GMT Message-Id: <202106081131.158BVCYW011291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 61814702398c - main - tests/netgraph: Tests for ng_bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61814702398ce29430b2bef75cbdd6fd2c07ad12 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 11:31:12 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=61814702398ce29430b2bef75cbdd6fd2c07ad12 commit 61814702398ce29430b2bef75cbdd6fd2c07ad12 Author: Lutz Donnerhacke AuthorDate: 2021-06-04 10:59:00 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-08 11:27:23 +0000 tests/netgraph: Tests for ng_bridge Test functionality of ng_bridge(4): - replicating traffic to anything but the sending hook - persistence - detect loops - unicast to only one link of many - stretch to implementation limits on broadcast Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30647 --- tests/sys/netgraph/Makefile | 2 + tests/sys/netgraph/bridge.c | 654 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 656 insertions(+) diff --git a/tests/sys/netgraph/Makefile b/tests/sys/netgraph/Makefile index 9f220a620bbe..7376cb5c1227 100644 --- a/tests/sys/netgraph/Makefile +++ b/tests/sys/netgraph/Makefile @@ -11,8 +11,10 @@ TEST_METADATA.ng_macfilter_test+= required_user="root" TEST_METADATA.ng_macfilter_test+= required_programs="perl" ATF_TESTS_C+= basic \ + bridge \ SRCS.basic= basic.c util.c +SRCS.bridge= bridge.c util.c LIBADD+= netgraph diff --git a/tests/sys/netgraph/bridge.c b/tests/sys/netgraph/bridge.c new file mode 100644 index 000000000000..41d2346b527b --- /dev/null +++ b/tests/sys/netgraph/bridge.c @@ -0,0 +1,654 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright 2021 Lutz Donnerhacke + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +#include +#include + +#include +#include +#include +#include + +#include "util.h" +#include + +static void get_data0(void *data, size_t len, void *ctx); +static void get_data1(void *data, size_t len, void *ctx); +static void get_data2(void *data, size_t len, void *ctx); +static void get_data3(void *data, size_t len, void *ctx); + +static void get_tablesize(char const *source, struct ng_mesg *msg, void *ctx); +struct gettable +{ + u_int32_t tok; + int cnt; +}; + +struct frame4 +{ + struct ether_header eh; + struct ip ip; + char data[64]; +}; +struct frame6 +{ + struct ether_header eh; + struct ip6_hdr ip; + char data[64]; +}; + +static struct frame4 msg4 = { + .ip.ip_v = 4, + .ip.ip_hl = 5, + .ip.ip_ttl = 1, + .ip.ip_p = 254, + .ip.ip_src = {htonl(0x0a00dead)}, + .ip.ip_dst = {htonl(0x0a00beef)}, + .ip.ip_len = 32, + .eh.ether_type = ETHERTYPE_IP, + .eh.ether_shost = {2, 4, 6}, + .eh.ether_dhost = {2, 4, 6}, +}; + + +ATF_TC(basic); +ATF_TC_HEAD(basic, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(basic, dummy) +{ + int r[4]; + struct gettable rm; + + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "bridge", "link0"); + ng_name("a", "bridge"); + ng_connect(".", "b", "bridge:", "link1"); + ng_connect(".", "c", "bridge:", "link2"); + + /* do not bounce back */ + ng_register_data("a", get_data0); + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0); + + /* send to others */ + ng_register_data("b", get_data1); + ng_register_data("c", get_data2); + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1); + + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 2; + ng_send_data("b", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1); + + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 3; + ng_send_data("c", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 1 && r[2] == 0); + + /* send to learned unicast */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + msg4.eh.ether_dhost[5] = 3; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1); + + /* inspect mac table */ + ng_register_msg(get_tablesize); + rm.tok = ng_send_msg("bridge:", "gettable"); + rm.cnt = 0; + ng_handle_events(50, &rm); + ATF_CHECK(rm.cnt == 3); + + /* remove a link */ + ng_rmhook(".", "b"); + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + msg4.eh.ether_dhost[5] = 0; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1); + + /* inspect mac table */ + ng_register_msg(get_tablesize); + rm.tok = ng_send_msg("bridge:", "gettable"); + rm.cnt = 0; + ng_handle_events(50, &rm); + ATF_CHECK(rm.cnt == 2); + + ng_shutdown("bridge:"); +} + +ATF_TC(persistence); +ATF_TC_HEAD(persistence, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(persistence, dummy) +{ + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "bridge", "link0"); + ng_name("a", "bridge"); + + ng_send_msg("bridge:", "setpersistent"); + ng_rmhook(".", "a"); + + ng_shutdown("bridge:"); +} + +ATF_TC(loop); +ATF_TC_HEAD(loop, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(loop, dummy) +{ + int r[4], i; + + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge1:"); + ng_shutdown("bridge2:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "bridge", "link0"); + ng_name("a", "bridge1"); + ng_mkpeer(".", "b", "bridge", "link1"); + ng_name("b", "bridge2"); + + ng_register_data("a", get_data0); + ng_register_data("b", get_data1); + + /*- + * Open loop + * + * /-- bridge1 + * . < | + * \-- bridge2 + */ + ng_connect("bridge1:", "link11", "bridge2:", "link11"); + + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1); + + /*- + * Closed loop, DANGEROUS! + * + * /-- bridge1 -\ + * . < | | + * \-- bridge2 -/ + */ + ng_connect("bridge1:", "link12", "bridge2:", "link12"); + + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + ng_errors(PASS); + ng_send_data("a", &msg4, sizeof(msg4)); + ATF_CHECK_ERRNO(ELOOP, errno != 0); /* loop might be detected */ + ng_errors(FAIL); + for (i = 0; i < 10; i++) /* don't run forever */ + if (!ng_handle_event(50, &r)) + break; + ATF_CHECK(r[0] == 0 && r[1] == 1); + + ng_shutdown("bridge1:"); + ng_shutdown("bridge2:"); +} + +ATF_TC(many_unicasts); +ATF_TC_HEAD(many_unicasts, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(many_unicasts, dummy) +{ + int r[4], i; + const int HOOKS = 1000; + struct gettable rm; + + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "bridge", "link0"); + ng_name("a", "bridge"); + ng_register_data("a", get_data0); + + /* learn MAC */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[3] = 0xff; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0); + + /* use learned MAC as destination */ + msg4.eh.ether_shost[3] = 0; + msg4.eh.ether_dhost[3] = 0xff; + + /* now send */ + bzero(r, sizeof(r)); + for (i = 1; i <= HOOKS; i++) + { + char hook[20]; + + snprintf(hook, sizeof(hook), "link%d", i); + ng_connect(".", hook, "bridge:", hook); + ng_register_data(hook, get_data2); + + msg4.eh.ether_shost[4] = i >> 8; + msg4.eh.ether_shost[5] = i & 0xff; + ng_errors(PASS); + ng_send_data(hook, &msg4, sizeof(msg4)); + ng_errors(FAIL); + if (errno != 0) + break; + ng_handle_events(50, &r); + } + ATF_CHECK(r[0] == HOOKS && r[2] == 0); + + /* inspect mac table */ + ng_register_msg(get_tablesize); + rm.cnt = 0; + ng_errors(PASS); + rm.tok = ng_send_msg("bridge:", "gettable"); + ng_errors(FAIL); + if (rm.tok == (u_int32_t)-1) + { + ATF_CHECK_ERRNO(ENOBUFS, 1); + atf_tc_expect_fail("response too large"); + } + ng_handle_events(50, &rm); + ATF_CHECK(rm.cnt == HOOKS + 1); + atf_tc_expect_pass(); + + ng_shutdown("bridge:"); +} + +ATF_TC(many_broadcasts); +ATF_TC_HEAD(many_broadcasts, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(many_broadcasts, dummy) +{ + int r[4], i; + const int HOOKS = 1000; + + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "bridge", "link0"); + ng_name("a", "bridge"); + ng_register_data("a", get_data0); + + /* learn MAC */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[3] = 0xff; + ng_send_data("a", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0); + + /* use broadcast MAC */ + msg4.eh.ether_shost[3] = 0; + memset(msg4.eh.ether_dhost, 0xff, sizeof(msg4.eh.ether_dhost)); + + /* now send */ + bzero(r, sizeof(r)); + for (i = 1; i <= HOOKS; i++) + { + char hook[20]; + + snprintf(hook, sizeof(hook), "link%d", i); + ng_connect(".", hook, "bridge:", hook); + ng_register_data(hook, get_data3); + + msg4.eh.ether_shost[4] = i >> 8; + msg4.eh.ether_shost[5] = i & 0xff; + ng_errors(PASS); + ng_send_data(hook, &msg4, sizeof(msg4)); + ng_errors(FAIL); + if (errno != 0) + break; + ng_handle_events(50, &r); + } + ATF_CHECK(r[0] > 100 && r[3] > 100); + if (i < HOOKS) + atf_tc_expect_fail("netgraph queue full (%d)", i); + ATF_CHECK(r[0] == HOOKS); + atf_tc_expect_pass(); + + ng_shutdown("bridge:"); +} + +ATF_TC(uplink_private); +ATF_TC_HEAD(uplink_private, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(uplink_private, dummy) +{ + int r[4]; + struct gettable rm; + + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge:"); + + ng_mkpeer(".", "u1", "bridge", "uplink1"); + if (errno > 0) + atf_tc_skip("uplinks are not supported."); + ng_errors(FAIL); + ng_name("u1", "bridge"); + ng_register_data("u1", get_data1); + ng_connect(".", "u2", "bridge:", "uplink2"); + ng_register_data("u2", get_data2); + ng_connect(".", "l0", "bridge:", "link0"); + ng_register_data("l0", get_data0); + ng_connect(".", "l3", "bridge:", "link3"); + ng_register_data("l3", get_data3); + + /* unknown unicast 0 from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 0); + + /* unknown unicast 2 from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + msg4.eh.ether_dhost[5] = 2; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 0); + + /* known unicast 0 from uplink2 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 2; + msg4.eh.ether_dhost[5] = 0; + ng_send_data("u2", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + + /* known unicast 0 from link3 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 3; + msg4.eh.ether_dhost[5] = 0; + ng_send_data("l3", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + + /* (un)known unicast 2 from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + msg4.eh.ether_dhost[5] = 2; + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 0); + + /* (un)known unicast 2 from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 0); + + /* unknown multicast 2 from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + msg4.eh.ether_dhost[0] = 0xff; + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); + + /* unknown multicast 2 from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); + + /* broadcast from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + memset(msg4.eh.ether_dhost, 0xff, sizeof(msg4.eh.ether_dhost)); + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); + + /* broadcast from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); + + /* inspect mac table */ + ng_register_msg(get_tablesize); + rm.tok = ng_send_msg("bridge:", "gettable"); + rm.cnt = 0; + ng_handle_events(50, &rm); + ATF_CHECK(rm.cnt == 2); + + ng_shutdown("bridge:"); +} + +ATF_TC(uplink_classic); +ATF_TC_HEAD(uplink_classic, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(uplink_classic, dummy) +{ + int r[4]; + struct gettable rm; + + ng_init(); + ng_errors(PASS); + ng_shutdown("bridge:"); + + ng_mkpeer(".", "l0", "bridge", "link0"); + if (errno > 0) + atf_tc_skip("uplinks are not supported."); + ng_errors(FAIL); + ng_name("l0", "bridge"); + ng_register_data("l0", get_data0); + ng_connect(".", "u1", "bridge:", "uplink1"); + ng_register_data("u1", get_data1); + ng_connect(".", "u2", "bridge:", "uplink2"); + ng_register_data("u2", get_data2); + ng_connect(".", "l3", "bridge:", "link3"); + ng_register_data("l3", get_data3); + + /* unknown unicast 0 from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); + + /* unknown unicast 2 from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + msg4.eh.ether_dhost[5] = 2; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); + + /* known unicast 0 from uplink2 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 2; + msg4.eh.ether_dhost[5] = 0; + ng_send_data("u2", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + + /* known unicast 0 from link3 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 3; + msg4.eh.ether_dhost[5] = 0; + ng_send_data("l3", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + + /* (un)known unicast 2 from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + msg4.eh.ether_dhost[5] = 2; + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); + + /* (un)known unicast 2 from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); + + /* unknown multicast 2 from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + msg4.eh.ether_dhost[0] = 0xff; + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); + + /* unknown multicast 2 from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); + + /* broadcast from uplink1 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 1; + memset(msg4.eh.ether_dhost, 0xff, sizeof(msg4.eh.ether_dhost)); + ng_send_data("u1", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); + + /* broadcast from link0 */ + bzero(r, sizeof(r)); + msg4.eh.ether_shost[5] = 0; + ng_send_data("l0", &msg4, sizeof(msg4)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); + + /* inspect mac table */ + ng_register_msg(get_tablesize); + rm.tok = ng_send_msg("bridge:", "gettable"); + rm.cnt = 0; + ng_handle_events(50, &rm); + ATF_CHECK(rm.cnt == 2); + + ng_shutdown("bridge:"); +} + +ATF_TP_ADD_TCS(bridge) +{ + ATF_TP_ADD_TC(bridge, basic); + ATF_TP_ADD_TC(bridge, loop); + ATF_TP_ADD_TC(bridge, persistence); + ATF_TP_ADD_TC(bridge, many_unicasts); + ATF_TP_ADD_TC(bridge, many_broadcasts); + ATF_TP_ADD_TC(bridge, uplink_private); + ATF_TP_ADD_TC(bridge, uplink_classic); + + return atf_no_error(); +} + +static inline void +_get_data(void *data, size_t len, void *ctx, int i) +{ + int *cnt = ctx; + + (void)data; + fprintf(stderr, "[%d] Got %zu bytes of data.\n", i, len); + cnt[i]++; +} + +#define GD(x) static void \ +get_data##x(void *data, size_t len, void *ctx) {\ + _get_data(data, len, ctx, x); \ +} + +GD(0) +GD(1) +GD(2) +GD(3) + +static void +get_tablesize(char const *source, struct ng_mesg *msg, void *ctx) +{ + struct gettable *rm = ctx; + struct ng_bridge_host_ary *gt = (void *)msg->data; + + fprintf(stderr, "Response from %s to query %d\n", source, msg->header.token); + if (rm->tok == msg->header.token) + rm->cnt = gt->numHosts; +} From owner-dev-commits-src-main@freebsd.org Tue Jun 8 13:50:29 2021 Return-Path: Delivered-To: dev-commits-src-main@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 C8A0665FBB1; Tue, 8 Jun 2021 13:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzs7n5CLBz4rhb; Tue, 8 Jun 2021 13:50:29 +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 9C1FB1B67; Tue, 8 Jun 2021 13:50:29 +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 158DoTlk096313; Tue, 8 Jun 2021 13:50:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158DoTmi096312; Tue, 8 Jun 2021 13:50:29 GMT (envelope-from git) Date: Tue, 8 Jun 2021 13:50:29 GMT Message-Id: <202106081350.158DoTmi096312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 97993d1ebf59 - main - hyperv: Fix vmbus after the i386 4/4 split MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97993d1ebf592ac6689a498d5d0d2afb46758680 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 13:50:29 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=97993d1ebf592ac6689a498d5d0d2afb46758680 commit 97993d1ebf592ac6689a498d5d0d2afb46758680 Author: Mark Johnston AuthorDate: 2021-06-08 13:40:30 +0000 Commit: Mark Johnston CommitDate: 2021-06-08 13:40:30 +0000 hyperv: Fix vmbus after the i386 4/4 split The vmbus ISR needs to live in a trampoline. Dynamically allocating a trampoline at driver initialization time poses some difficulties due to the fact that the KENTER macro assumes that the offset relative to tramp_idleptd is fixed at static link time. Another problem is that native_lapic_ipi_alloc() uses setidt(), which assumes a fixed trampoline offset. Rather than fight this, move the Hyper-V ISR to i386/exception.s. Add a new HYPERV kernel option to make this optional, and configure it by default on i386. This is sufficient to make use of vmbus(4) after the 4/4 split. Note that vmbus cannot be loaded dynamically and both the HYPERV option and device must be configured together. I think this is not too onerous a requirement, since vmbus(4) was previously non-functional. Reported by: Harry Schmalzbauer Tested by: Harry Schmalzbauer Reviewed by: whu, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30577 --- sys/conf/files.i386 | 1 - sys/conf/options.i386 | 3 +++ sys/dev/hyperv/vmbus/i386/vmbus_vector.S | 6 +++++- sys/i386/conf/GENERIC | 4 +++- sys/i386/i386/exception.s | 9 +++++++++ sys/modules/hyperv/vmbus/Makefile | 5 ++++- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 331ad5fec79a..10e286dae271 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -102,7 +102,6 @@ dev/glxiic/glxiic.c optional glxiic dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv -dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv dev/le/if_le_isa.c optional le isa dev/nctgpio/nctgpio.c optional nctgpio dev/nfe/if_nfe.c optional nfe pci diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index 4249fa1dfd0a..5e7ea446089b 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -101,6 +101,9 @@ NPX_DEBUG opt_npx.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h +# Hyper-V support +HYPERV opt_hyperv.h + XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) diff --git a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S index 0570c6b49e1c..d119cfdc5b12 100644 --- a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S +++ b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S @@ -35,6 +35,9 @@ /* * This is the Hyper-V vmbus channel direct callback interrupt. * Only used when it is running on Hyper-V. + * + * Note that this file is not compiled directly, it is included into + * i386/exception.s. */ .text SUPERALIGN_TEXT @@ -45,6 +48,7 @@ IDTVEC(vmbus_isr) cld KENTER pushl %esp - call vmbus_handle_intr + mov $vmbus_handle_intr, %eax + call *%eax add $4, %esp jmp doreti diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 1b4d853fe1d4..288968d84af1 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -339,7 +339,9 @@ device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device # HyperV drivers and enhancement support -device hyperv # HyperV drivers +# NOTE: HYPERV depends on hyperv. They must be added or removed together. +options HYPERV # Kernel support for HyperV drivers +device hyperv # HyperV drivers # Xen HVM Guest Optimizations # NOTE: XENHVM depends on xenpci. They must be added or removed together. diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 6989d3e2828a..f47ab92f1987 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -39,6 +39,7 @@ #include "opt_apic.h" #include "opt_atpic.h" #include "opt_hwpmc_hooks.h" +#include "opt_hyperv.h" #include "assym.inc" @@ -404,6 +405,14 @@ ENTRY(fork_trampoline) #ifdef DEV_APIC #include +#endif + +#ifdef HYPERV + .data + .p2align 4 + .text + SUPERALIGN_TEXT +#include #endif .data diff --git a/sys/modules/hyperv/vmbus/Makefile b/sys/modules/hyperv/vmbus/Makefile index 435106c7e9bd..47a83e76204a 100644 --- a/sys/modules/hyperv/vmbus/Makefile +++ b/sys/modules/hyperv/vmbus/Makefile @@ -13,8 +13,11 @@ SRCS= hyperv.c \ vmbus_et.c \ vmbus_if.c \ vmbus_res.c \ - vmbus_vector.S \ vmbus_xact.c + +.if ${MACHINE_CPUARCH} != "i386" +SRCS+= vmbus_vector.S +.endif SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h # XXX: for assym.inc From owner-dev-commits-src-main@freebsd.org Tue Jun 8 14:26:13 2021 Return-Path: Delivered-To: dev-commits-src-main@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 10C8263850F; Tue, 8 Jun 2021 14:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzsx05YQSz3BqD; Tue, 8 Jun 2021 14:26: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 A6F9824DA; Tue, 8 Jun 2021 14:26: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 158EQC6o081380; Tue, 8 Jun 2021 14:26:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158EQChA081379; Tue, 8 Jun 2021 14:26:12 GMT (envelope-from git) Date: Tue, 8 Jun 2021 14:26:12 GMT Message-Id: <202106081426.158EQChA081379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: ed9215c8e05f - main - zfs: merge openzfs/zfs@3522f57b6 (master) to main MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed9215c8e05f06c00683bb0624e82644796d4385 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 14:26:13 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ed9215c8e05f06c00683bb0624e82644796d4385 commit ed9215c8e05f06c00683bb0624e82644796d4385 Merge: 97993d1ebf59 3522f57b6ada Author: Martin Matuska AuthorDate: 2021-06-08 14:23:50 +0000 Commit: Martin Matuska CommitDate: 2021-06-08 14:25:14 +0000 zfs: merge openzfs/zfs@3522f57b6 (master) to main This changes branch tracking of sys/contrib/openzfs to a new direct-import branch vendor/openzfs/master. No functional changes. OpenZFS tag: 2.1.0-rc1 sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 1 + sys/contrib/openzfs/scripts/zfs-images | 1 + 3 files changed, 3 insertions(+) diff --cc sys/contrib/openzfs/scripts/zfs-images index 000000000000,3331601f6dc5..3331601f6dc5 mode 000000,160000..160000 --- a/sys/contrib/openzfs/scripts/zfs-images +++ b/sys/contrib/openzfs/scripts/zfs-images From owner-dev-commits-src-main@freebsd.org Tue Jun 8 14:53:45 2021 Return-Path: Delivered-To: dev-commits-src-main@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 533DE638A77; Tue, 8 Jun 2021 14:53:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FztXn1sMfz3GMG; Tue, 8 Jun 2021 14:53:45 +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 289002D1D; Tue, 8 Jun 2021 14:53:45 +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 158ErjVK025235; Tue, 8 Jun 2021 14:53:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158Eri7k025234; Tue, 8 Jun 2021 14:53:44 GMT (envelope-from git) Date: Tue, 8 Jun 2021 14:53:44 GMT Message-Id: <202106081453.158Eri7k025234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1603881667360c015f6685131f2f25474fa67a72 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 14:53:45 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=1603881667360c015f6685131f2f25474fa67a72 commit 1603881667360c015f6685131f2f25474fa67a72 Merge: ed9215c8e05f 75b4cbf62590 Author: Martin Matuska AuthorDate: 2021-06-08 14:48:37 +0000 Commit: Martin Matuska CommitDate: 2021-06-08 14:52:44 +0000 zfs: merge openzfs/zfs@75b4cbf62 (master) into main Notable upstream pull request merges: #11710 Allow zfs to send replication streams with missing snapshots #11751 Avoid taking global lock to destroy zfsdev state #11786 Ratelimit deadman zevents as with delay zevents #11803 ZFS traverse_visitbp optimization to limit prefetch #11813 Allow pool names that look like Solaris disk names #11822 Atomically check and set dropped zevent count #11822 Don't scale zfs_zevent_len_max by CPU count #11833 Refactor zfsdev state init/destroy to share common code #11837 zfs get -p only outputs 3 columns if "clones" property is empty #11843 libzutil: zfs_isnumber(): return false if input empty #11849 Use dsl_scan_setup_check() to setup a scrub #11861 Improvements to the 'compatibility' property #11862 cmd/zfs receive: allow dry-run (-n) to check property args #11864 receive: don't fail inheriting (-x) properties on wrong dataset type #11877 Combine zio caches if possible #11881 FreeBSD: use vnlru_free_vfsops if available #11883 FreeBSD: add support for lockless symlink lookup #11884 FreeBSD: add missing seqc write begin/end around zfs_acl_chown_setattr #11896 Fix crash in zio_done error reporting #11905 zfs-send(8): Restore sorting of flags #11926 FreeBSD: damage control racing .. lookups in face of mkdir/rmdir #11930 vdev_mirror: don't scrub/resilver devices that can't be read #11938 Fix AVX512BW Fletcher code on AVX512-but-not-BW machines #11955 zfs get: don't lookup mount options when using "-s local" #11956 libzfs: add keylocation=https://, backed by fetch(3) or libcurl #11959 vdev_id: variable not getting expanded under map_slot() #11966 Scale worker threads and taskqs with number of CPUs #11994 Clean up use of zfs_log_create in zfs_dir #11997 FreeBSD: Don't force xattr mount option #11997 FreeBSD: Implement xattr=sa #11997 FreeBSD: Use SET_ERROR to trace xattr name errors #11998 Simplify/fix dnode_move() for dn_zfetch #12003 FreeBSD: Initialize/destroy zp->z_lock #12010 Fix dRAID self-healing short columns #12033 Revert "Fix raw sends on encrypted datasets when copying back snapshots" #12040 Reinstate the old zpool read label logic as a fallback #12046 Improve scrub maxinflight_bytes math #12049 FreeBSD: avoid memory allocation in arc_prune_async #12052 FreeBSD: incorporate changes to the VFS_QUOTACTL(9) KPI #12061 Fix dRAID sequential resilver silent damage handling #12072 Let zfs diff be more permissive #12077 FreeBSD: Retry OCF ENOMEM errors. #12088 Propagate vdev state due to invalid label corruption #12091 libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat #12097 FreeBSD: Update dataset_kstats for zvols in dev mode #12104 FreeBSD boot code reminder after zpool upgrade #12114 Introduce write-mostly sums Obtained from: OpenZFS OpenZFS commit: 75b4cbf62590c23fac3667537961a2a75fdc2cc3 cddl/share/zfs/compatibility.d/Makefile | 4 + .../openzfs/.github/ISSUE_TEMPLATE/config.yml | 2 +- .../.github/workflows/zfs-tests-functional.yml | 8 +- .../openzfs/.github/workflows/zfs-tests-sanity.yml | 8 +- sys/contrib/openzfs/.gitmodules | 2 +- sys/contrib/openzfs/META | 4 +- sys/contrib/openzfs/Makefile.am | 54 +- sys/contrib/openzfs/RELEASES.md | 37 + sys/contrib/openzfs/cmd/Makefile.am | 8 +- sys/contrib/openzfs/cmd/arc_summary/arc_summary2 | 97 +- sys/contrib/openzfs/cmd/arc_summary/arc_summary3 | 50 +- sys/contrib/openzfs/cmd/fsck_zfs/.gitignore | 1 + sys/contrib/openzfs/cmd/fsck_zfs/Makefile.am | 5 + sys/contrib/openzfs/cmd/fsck_zfs/fsck.zfs | 9 - sys/contrib/openzfs/cmd/fsck_zfs/fsck.zfs.in | 44 + sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c | 7 +- sys/contrib/openzfs/cmd/raidz_test/raidz_test.c | 21 +- sys/contrib/openzfs/cmd/vdev_id/Makefile.am | 2 + sys/contrib/openzfs/cmd/vdev_id/vdev_id | 7 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 251 +- sys/contrib/openzfs/cmd/zed/Makefile.am | 4 +- sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c | 1 + sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 1 + sys/contrib/openzfs/cmd/zed/zed.c | 48 +- sys/contrib/openzfs/cmd/zed/zed.d/Makefile.am | 1 + sys/contrib/openzfs/cmd/zed/zed.d/data-notify.sh | 2 +- .../openzfs/cmd/zed/zed.d/generic-notify.sh | 2 +- .../zed/zed.d/history_event-zfs-list-cacher.sh.in | 4 +- .../openzfs/cmd/zed/zed.d/scrub_finish-notify.sh | 2 +- .../openzfs/cmd/zed/zed.d/statechange-led.sh | 90 +- .../openzfs/cmd/zed/zed.d/statechange-notify.sh | 2 +- .../openzfs/cmd/zed/zed.d/trim_finish-notify.sh | 2 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 100 +- sys/contrib/openzfs/cmd/zed/zed.d/zed.rc | 17 + sys/contrib/openzfs/cmd/zed/zed.h | 17 +- sys/contrib/openzfs/cmd/zed/zed_conf.c | 218 +- sys/contrib/openzfs/cmd/zed/zed_conf.h | 38 +- sys/contrib/openzfs/cmd/zed/zed_disk_event.c | 1 + sys/contrib/openzfs/cmd/zed/zed_event.c | 82 +- sys/contrib/openzfs/cmd/zed/zed_event.h | 2 +- sys/contrib/openzfs/cmd/zed/zed_exec.c | 255 +- sys/contrib/openzfs/cmd/zed/zed_exec.h | 8 +- sys/contrib/openzfs/cmd/zed/zed_file.c | 120 +- sys/contrib/openzfs/cmd/zed/zed_file.h | 8 +- sys/contrib/openzfs/cmd/zed/zed_log.c | 2 +- sys/contrib/openzfs/cmd/zed/zed_log.h | 2 +- sys/contrib/openzfs/cmd/zed/zed_strings.c | 2 +- sys/contrib/openzfs/cmd/zed/zed_strings.h | 2 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 49 +- .../openzfs/cmd/zfs_ids_to_path/zfs_ids_to_path.c | 8 +- sys/contrib/openzfs/cmd/zgenhostid/zgenhostid.c | 18 +- sys/contrib/openzfs/cmd/zhack/zhack.c | 3 +- sys/contrib/openzfs/cmd/zpool/Makefile.am | 5 + .../cmd/zpool/compatibility.d/openzfs-2.1-freebsd | 34 + .../cmd/zpool/compatibility.d/openzfs-2.1-linux | 35 + .../openzfs/cmd/zpool/compatibility.d/zol-0.6.1 | 4 + .../openzfs/cmd/zpool/compatibility.d/zol-0.6.4 | 10 + .../openzfs/cmd/zpool/os/freebsd/zpool_vdev_os.c | 15 + .../openzfs/cmd/zpool/os/linux/zpool_vdev_os.c | 5 + sys/contrib/openzfs/cmd/zpool/zpool.d/smart | 15 +- sys/contrib/openzfs/cmd/zpool/zpool_iter.c | 15 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 259 +- sys/contrib/openzfs/cmd/zpool/zpool_util.c | 16 + sys/contrib/openzfs/cmd/zpool/zpool_util.h | 2 + sys/contrib/openzfs/cmd/zpool/zpool_vdev.c | 2 +- .../openzfs/cmd/zpool_influxdb/zpool_influxdb.c | 11 +- sys/contrib/openzfs/cmd/zstream/Makefile.am | 3 + sys/contrib/openzfs/cmd/zstream/zstream.c | 5 + sys/contrib/openzfs/cmd/zstream/zstream_redup.c | 1 - sys/contrib/openzfs/cmd/zstreamdump/Makefile.am | 1 - sys/contrib/openzfs/cmd/zstreamdump/zstreamdump | 3 - sys/contrib/openzfs/cmd/ztest/ztest.c | 275 +- sys/contrib/openzfs/cmd/zvol_wait/Makefile.am | 2 + sys/contrib/openzfs/cmd/zvol_wait/zvol_wait | 43 +- sys/contrib/openzfs/config/Abigail.am | 2 +- sys/contrib/openzfs/config/CppCheck.am | 2 +- sys/contrib/openzfs/config/Rules.am | 1 + sys/contrib/openzfs/config/Shellcheck.am | 22 + sys/contrib/openzfs/config/Substfiles.am | 4 +- sys/contrib/openzfs/config/always-shellcheck.m4 | 10 + sys/contrib/openzfs/config/ax_python_devel.m4 | 3 +- sys/contrib/openzfs/config/deb.am | 22 +- sys/contrib/openzfs/config/kernel-acl.m4 | 25 +- sys/contrib/openzfs/config/kernel-bdi.m4 | 4 +- sys/contrib/openzfs/config/kernel-blk-queue.m4 | 8 +- .../config/kernel-block-device-operations.m4 | 32 + .../openzfs/config/kernel-generic_fillattr.m4 | 2 +- .../openzfs/config/kernel-is_owner_or_cap.m4 | 4 + sys/contrib/openzfs/config/kernel-percpu.m4 | 27 + sys/contrib/openzfs/config/kernel-rename.m4 | 1 + sys/contrib/openzfs/config/kernel-siginfo.m4 | 21 + sys/contrib/openzfs/config/kernel-signal-stop.m4 | 21 + sys/contrib/openzfs/config/kernel-special-state.m4 | 21 + sys/contrib/openzfs/config/kernel-tmpfile.m4 | 28 +- sys/contrib/openzfs/config/kernel.m4 | 6 + sys/contrib/openzfs/config/user-libatomic.m4 | 34 + sys/contrib/openzfs/config/user-libfetch.m4 | 71 + sys/contrib/openzfs/config/user.m4 | 2 + sys/contrib/openzfs/config/zfs-build.m4 | 24 + sys/contrib/openzfs/configure.ac | 2 +- sys/contrib/openzfs/contrib/Makefile.am | 4 + .../openzfs/contrib/bash_completion.d/.gitignore | 1 + .../openzfs/contrib/bash_completion.d/Makefile.am | 10 +- .../contrib/bash_completion.d/{zfs => zfs.in} | 87 +- sys/contrib/openzfs/contrib/bpftrace/Makefile.am | 4 + sys/contrib/openzfs/contrib/bpftrace/zfs-trace.sh | 4 +- .../dracut/02zfsexpandknowledge/Makefile.am | 1 + .../dracut/02zfsexpandknowledge/module-setup.sh.in | 54 +- .../openzfs/contrib/dracut/90zfs/Makefile.am | 4 + .../contrib/dracut/90zfs/module-setup.sh.in | 23 +- .../openzfs/contrib/dracut/90zfs/mount-zfs.sh.in | 10 +- .../openzfs/contrib/dracut/90zfs/parse-zfs.sh.in | 3 +- .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 2 +- .../contrib/dracut/90zfs/zfs-generator.sh.in | 79 +- .../openzfs/contrib/dracut/90zfs/zfs-lib.sh.in | 57 +- .../contrib/dracut/90zfs/zfs-load-key.sh.in | 45 +- .../dracut/90zfs/zfs-rollback-bootfs.service.in | 2 +- .../dracut/90zfs/zfs-snapshot-bootfs.service.in | 2 +- sys/contrib/openzfs/contrib/dracut/Makefile.am | 3 + sys/contrib/openzfs/contrib/initramfs/Makefile.am | 3 + .../openzfs/contrib/initramfs/hooks/Makefile.am | 1 + sys/contrib/openzfs/contrib/initramfs/hooks/zfs.in | 132 +- .../openzfs/contrib/initramfs/hooks/zfsunlock.in | 16 +- .../openzfs/contrib/initramfs/scripts/Makefile.am | 7 +- .../initramfs/scripts/local-top/Makefile.am | 2 + .../contrib/initramfs/scripts/local-top/zfs | 21 +- sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 124 +- .../pyzfs/libzfs_core/test/test_libzfs_core.py | 4 +- sys/contrib/openzfs/copy-builtin | 45 +- sys/contrib/openzfs/etc/Makefile.am | 4 + sys/contrib/openzfs/etc/default/Makefile.am | 4 + sys/contrib/openzfs/etc/init.d/Makefile.am | 3 + sys/contrib/openzfs/etc/init.d/zfs-import.in | 26 +- sys/contrib/openzfs/etc/init.d/zfs-mount.in | 49 +- sys/contrib/openzfs/etc/init.d/zfs-share.in | 6 +- sys/contrib/openzfs/etc/init.d/zfs-zed.in | 31 +- sys/contrib/openzfs/etc/systemd/Makefile.am | 3 + .../etc/systemd/system-generators/Makefile.am | 14 +- .../system-generators/zfs-mount-generator.c | 1083 ++ .../system-generators/zfs-mount-generator.in | 473 - sys/contrib/openzfs/etc/zfs/Makefile.am | 3 + sys/contrib/openzfs/etc/zfs/zfs-functions.in | 99 +- sys/contrib/openzfs/include/Makefile.am | 1 - sys/contrib/openzfs/include/cityhash.h | 4 +- sys/contrib/openzfs/include/libuutil.h | 28 - sys/contrib/openzfs/include/libuutil_impl.h | 6 - sys/contrib/openzfs/include/libzfs.h | 520 +- sys/contrib/openzfs/include/libzutil.h | 71 +- .../openzfs/include/os/freebsd/spl/sys/Makefile.am | 2 +- .../openzfs/include/os/freebsd/spl/sys/console.h | 35 - .../openzfs/include/os/freebsd/spl/sys/vfs.h | 2 - .../openzfs/include/os/freebsd/spl/sys/vnode.h | 5 - .../include/os/freebsd/spl/sys/vnode_impl.h | 2 +- .../openzfs/include/os/freebsd/spl/sys/wmsum.h | 72 + .../include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 - .../include/os/freebsd/zfs/sys/zfs_znode_impl.h | 4 +- .../include/os/linux/kernel/linux/blkdev_compat.h | 22 +- .../include/os/linux/kernel/linux/mod_compat.h | 2 +- .../openzfs/include/os/linux/spl/sys/Makefile.am | 2 +- .../openzfs/include/os/linux/spl/sys/atomic.h | 4 + .../openzfs/include/os/linux/spl/sys/console.h | 30 - .../openzfs/include/os/linux/spl/sys/signal.h | 18 +- .../openzfs/include/os/linux/spl/sys/thread.h | 13 + .../openzfs/include/os/linux/spl/sys/wmsum.h | 76 + .../include/os/linux/zfs/sys/zfs_vfsops_os.h | 1 - sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 5 + sys/contrib/openzfs/include/sys/aggsum.h | 7 +- sys/contrib/openzfs/include/sys/dataset_kstats.h | 20 +- sys/contrib/openzfs/include/sys/dsl_scan.h | 1 + sys/contrib/openzfs/include/sys/fm/util.h | 1 - sys/contrib/openzfs/include/sys/fs/zfs.h | 104 +- sys/contrib/openzfs/include/sys/spa.h | 21 - sys/contrib/openzfs/include/sys/vdev_draid.h | 2 +- sys/contrib/openzfs/include/sys/vdev_impl.h | 5 +- sys/contrib/openzfs/include/sys/vdev_raidz_impl.h | 3 +- sys/contrib/openzfs/include/sys/vdev_rebuild.h | 2 +- sys/contrib/openzfs/include/sys/zfs_context.h | 6 +- sys/contrib/openzfs/include/sys/zfs_ioctl.h | 1 - sys/contrib/openzfs/include/sys/zfs_ioctl_impl.h | 5 + sys/contrib/openzfs/include/sys/zfs_sysfs.h | 4 +- sys/contrib/openzfs/include/sys/zio.h | 17 - sys/contrib/openzfs/include/sys/zio_checksum.h | 7 +- sys/contrib/openzfs/include/zfeature_common.h | 17 +- sys/contrib/openzfs/include/zfs_comutil.h | 17 +- sys/contrib/openzfs/include/zfs_deleg.h | 10 +- sys/contrib/openzfs/include/zfs_fletcher.h | 49 +- sys/contrib/openzfs/include/zfs_namecheck.h | 28 +- sys/contrib/openzfs/include/zfs_prop.h | 50 +- sys/contrib/openzfs/lib/libefi/rdwr_efi.c | 13 +- sys/contrib/openzfs/lib/libnvpair/libnvpair.abi | 4815 ++++---- sys/contrib/openzfs/lib/libnvpair/libnvpair_json.c | 15 +- sys/contrib/openzfs/lib/libshare/Makefile.am | 1 + sys/contrib/openzfs/lib/libshare/libshare.c | 1 - sys/contrib/openzfs/lib/libshare/libshare_impl.h | 4 + sys/contrib/openzfs/lib/libshare/nfs.c | 157 + sys/contrib/openzfs/lib/libshare/nfs.h | 9 + sys/contrib/openzfs/lib/libshare/os/freebsd/nfs.c | 170 +- sys/contrib/openzfs/lib/libshare/os/linux/nfs.c | 166 +- sys/contrib/openzfs/lib/libshare/os/linux/smb.c | 4 +- sys/contrib/openzfs/lib/libspl/Makefile.am | 29 +- .../openzfs/lib/libspl/asm-generic/.gitignore | 1 - sys/contrib/openzfs/lib/libspl/asm-i386/atomic.S | 840 -- sys/contrib/openzfs/lib/libspl/asm-x86_64/atomic.S | 691 -- sys/contrib/openzfs/lib/libspl/assert.c | 4 +- .../openzfs/lib/libspl/{asm-generic => }/atomic.c | 196 +- .../{libuutil/uu_open.c => libspl/getexecname.c} | 61 +- sys/contrib/openzfs/lib/libspl/include/assert.h | 2 +- sys/contrib/openzfs/lib/libspl/include/atomic.h | 43 + .../openzfs/lib/libspl/include/sys/Makefile.am | 1 + sys/contrib/openzfs/lib/libspl/include/sys/wmsum.h | 68 + sys/contrib/openzfs/lib/libspl/libspl_impl.h | 24 + .../openzfs/lib/libspl/os/freebsd/getexecname.c | 49 +- sys/contrib/openzfs/lib/libspl/os/freebsd/mnttab.c | 4 +- .../openzfs/lib/libspl/os/linux/getexecname.c | 37 +- .../openzfs/lib/libspl/os/linux/gethostid.c | 41 +- .../openzfs/lib/libspl/os/linux/getmntany.c | 9 +- sys/contrib/openzfs/lib/libspl/page.c | 2 +- sys/contrib/openzfs/lib/libuutil/Makefile.am | 2 - sys/contrib/openzfs/lib/libuutil/libuutil.abi | 2952 +++-- sys/contrib/openzfs/lib/libuutil/uu_dprintf.c | 130 - sys/contrib/openzfs/lib/libuutil/uu_misc.c | 27 - sys/contrib/openzfs/lib/libzfs/Makefile.am | 6 +- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 11230 +++++++++++-------- sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c | 200 +- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 60 +- sys/contrib/openzfs/lib/libzfs/libzfs_diff.c | 50 +- .../openzfs/{include => lib/libzfs}/libzfs_impl.h | 108 +- sys/contrib/openzfs/lib/libzfs/libzfs_import.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_iter.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 53 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 304 +- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 169 +- sys/contrib/openzfs/lib/libzfs/libzfs_status.c | 28 +- sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 80 +- .../openzfs/lib/libzfs/os/freebsd/libzfs_compat.c | 63 +- .../openzfs/lib/libzfs/os/freebsd/libzfs_zmount.c | 7 +- .../openzfs/lib/libzfs/os/linux/libzfs_mount_os.c | 2 +- .../openzfs/lib/libzfs/os/linux/libzfs_pool_os.c | 12 +- .../lib/libzfs/os/linux/libzfs_sendrecv_os.c | 4 +- .../openzfs/lib/libzfs/os/linux/libzfs_util_os.c | 6 +- .../openzfs/lib/libzfs_core/libzfs_core.abi | 5638 ++++++---- sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c | 12 +- .../openzfs/lib/libzfsbootenv/lzbe_device.c | 9 +- sys/contrib/openzfs/lib/libzpool/Makefile.am | 2 +- sys/contrib/openzfs/lib/libzpool/kernel.c | 8 +- sys/contrib/openzfs/lib/libzpool/util.c | 2 +- .../lib/libzutil/os/freebsd/zutil_import_os.c | 2 +- .../lib/libzutil/os/linux/zutil_device_path_os.c | 30 +- .../lib/libzutil/os/linux/zutil_import_os.c | 15 +- .../openzfs/lib/libzutil/zutil_device_path.c | 38 +- sys/contrib/openzfs/lib/libzutil/zutil_import.c | 116 +- sys/contrib/openzfs/lib/libzutil/zutil_nicenum.c | 3 + sys/contrib/openzfs/man/man1/arcstat.1 | 650 +- sys/contrib/openzfs/man/man1/cstyle.1 | 258 +- sys/contrib/openzfs/man/man1/raidz_test.1 | 153 +- sys/contrib/openzfs/man/man1/zhack.1 | 162 +- sys/contrib/openzfs/man/man1/ztest.1 | 327 +- sys/contrib/openzfs/man/man1/zvol_wait.1 | 37 +- .../openzfs/man/man5/spl-module-parameters.5 | 464 +- sys/contrib/openzfs/man/man5/vdev_id.conf.5 | 423 +- sys/contrib/openzfs/man/man5/zfs-events.5 | 1069 +- .../openzfs/man/man5/zfs-module-parameters.5 | 6038 ++++------ sys/contrib/openzfs/man/man5/zpool-features.5 | 1700 ++- sys/contrib/openzfs/man/man8/fsck.zfs.8 | 96 +- sys/contrib/openzfs/man/man8/mount.zfs.8 | 182 +- sys/contrib/openzfs/man/man8/vdev_id.8 | 154 +- sys/contrib/openzfs/man/man8/zdb.8 | 126 +- sys/contrib/openzfs/man/man8/zed.8.in | 409 +- sys/contrib/openzfs/man/man8/zfs-allow.8 | 201 +- sys/contrib/openzfs/man/man8/zfs-bookmark.8 | 24 +- sys/contrib/openzfs/man/man8/zfs-clone.8 | 27 +- sys/contrib/openzfs/man/man8/zfs-create.8 | 25 +- sys/contrib/openzfs/man/man8/zfs-destroy.8 | 20 +- sys/contrib/openzfs/man/man8/zfs-diff.8 | 63 +- sys/contrib/openzfs/man/man8/zfs-hold.8 | 24 +- sys/contrib/openzfs/man/man8/zfs-jail.8 | 108 +- sys/contrib/openzfs/man/man8/zfs-list.8 | 48 +- sys/contrib/openzfs/man/man8/zfs-load-key.8 | 176 +- .../openzfs/man/man8/zfs-mount-generator.8.in | 388 +- sys/contrib/openzfs/man/man8/zfs-mount.8 | 30 +- sys/contrib/openzfs/man/man8/zfs-program.8 | 415 +- sys/contrib/openzfs/man/man8/zfs-project.8 | 98 +- sys/contrib/openzfs/man/man8/zfs-promote.8 | 29 +- sys/contrib/openzfs/man/man8/zfs-receive.8 | 123 +- sys/contrib/openzfs/man/man8/zfs-rename.8 | 5 +- sys/contrib/openzfs/man/man8/zfs-rollback.8 | 18 +- sys/contrib/openzfs/man/man8/zfs-send.8 | 286 +- sys/contrib/openzfs/man/man8/zfs-set.8 | 86 +- sys/contrib/openzfs/man/man8/zfs-share.8 | 14 +- sys/contrib/openzfs/man/man8/zfs-snapshot.8 | 27 +- sys/contrib/openzfs/man/man8/zfs-upgrade.8 | 29 +- sys/contrib/openzfs/man/man8/zfs-userspace.8 | 80 +- sys/contrib/openzfs/man/man8/zfs-wait.8 | 30 +- sys/contrib/openzfs/man/man8/zfs.8 | 482 +- sys/contrib/openzfs/man/man8/zfs_ids_to_path.8 | 25 +- sys/contrib/openzfs/man/man8/zfsconcepts.8 | 64 +- sys/contrib/openzfs/man/man8/zfsprops.8 | 740 +- sys/contrib/openzfs/man/man8/zgenhostid.8 | 23 +- sys/contrib/openzfs/man/man8/zinject.8 | 378 +- sys/contrib/openzfs/man/man8/zpool-add.8 | 47 +- sys/contrib/openzfs/man/man8/zpool-attach.8 | 25 +- sys/contrib/openzfs/man/man8/zpool-checkpoint.8 | 40 +- sys/contrib/openzfs/man/man8/zpool-clear.8 | 24 +- sys/contrib/openzfs/man/man8/zpool-create.8 | 136 +- sys/contrib/openzfs/man/man8/zpool-destroy.8 | 17 +- sys/contrib/openzfs/man/man8/zpool-detach.8 | 21 +- sys/contrib/openzfs/man/man8/zpool-events.8 | 38 +- sys/contrib/openzfs/man/man8/zpool-export.8 | 23 +- sys/contrib/openzfs/man/man8/zpool-get.8 | 50 +- sys/contrib/openzfs/man/man8/zpool-history.8 | 16 +- sys/contrib/openzfs/man/man8/zpool-import.8 | 119 +- sys/contrib/openzfs/man/man8/zpool-initialize.8 | 28 +- sys/contrib/openzfs/man/man8/zpool-iostat.8 | 236 +- sys/contrib/openzfs/man/man8/zpool-labelclear.8 | 16 +- sys/contrib/openzfs/man/man8/zpool-list.8 | 43 +- sys/contrib/openzfs/man/man8/zpool-offline.8 | 29 +- sys/contrib/openzfs/man/man8/zpool-reguid.8 | 15 +- sys/contrib/openzfs/man/man8/zpool-remove.8 | 18 +- sys/contrib/openzfs/man/man8/zpool-reopen.8 | 27 +- sys/contrib/openzfs/man/man8/zpool-replace.8 | 44 +- sys/contrib/openzfs/man/man8/zpool-resilver.8 | 27 +- sys/contrib/openzfs/man/man8/zpool-scrub.8 | 31 +- sys/contrib/openzfs/man/man8/zpool-split.8 | 52 +- sys/contrib/openzfs/man/man8/zpool-status.8 | 52 +- sys/contrib/openzfs/man/man8/zpool-sync.8 | 30 +- sys/contrib/openzfs/man/man8/zpool-trim.8 | 47 +- sys/contrib/openzfs/man/man8/zpool-upgrade.8 | 43 +- sys/contrib/openzfs/man/man8/zpool-wait.8 | 54 +- sys/contrib/openzfs/man/man8/zpool.8 | 366 +- sys/contrib/openzfs/man/man8/zpool_influxdb.8 | 141 +- sys/contrib/openzfs/man/man8/zpoolconcepts.8 | 275 +- sys/contrib/openzfs/man/man8/zpoolprops.8 | 124 +- sys/contrib/openzfs/man/man8/zstream.8 | 29 +- sys/contrib/openzfs/man/man8/zstreamdump.8 | 59 +- sys/contrib/openzfs/module/avl/avl.c | 2 +- sys/contrib/openzfs/module/icp/Makefile.in | 7 +- sys/contrib/openzfs/module/icp/algs/edonr/edonr.c | 2 +- sys/contrib/openzfs/module/icp/algs/modes/gcm.c | 4 +- .../module/icp/asm-x86_64/sha1/sha1-x86_64.S | 24 +- .../module/icp/asm-x86_64/sha2/sha256_impl.S | 26 + .../module/icp/asm-x86_64/sha2/sha512_impl.S | 26 + .../openzfs/module/os/freebsd/spl/acl_common.c | 6 +- sys/contrib/openzfs/module/os/freebsd/spl/callb.c | 16 +- sys/contrib/openzfs/module/os/freebsd/spl/list.c | 17 +- .../openzfs/module/os/freebsd/spl/spl_kmem.c | 6 +- .../openzfs/module/os/freebsd/spl/spl_kstat.c | 14 +- .../openzfs/module/os/freebsd/spl/spl_string.c | 2 +- .../openzfs/module/os/freebsd/spl/spl_sysevent.c | 2 +- .../openzfs/module/os/freebsd/spl/spl_uio.c | 4 +- .../openzfs/module/os/freebsd/spl/spl_vfs.c | 6 +- sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 5 +- sys/contrib/openzfs/module/os/freebsd/zfs/arc_os.c | 16 +- .../openzfs/module/os/freebsd/zfs/crypto_os.c | 8 +- sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c | 45 +- .../openzfs/module/os/freebsd/zfs/kmod_core.c | 64 +- sys/contrib/openzfs/module/os/freebsd/zfs/spa_os.c | 83 +- .../openzfs/module/os/freebsd/zfs/vdev_file.c | 7 +- .../openzfs/module/os/freebsd/zfs/vdev_geom.c | 20 +- .../openzfs/module/os/freebsd/zfs/vdev_label_os.c | 2 +- .../openzfs/module/os/freebsd/zfs/zfs_acl.c | 73 +- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 22 +- .../openzfs/module/os/freebsd/zfs/zfs_debug.c | 5 +- .../openzfs/module/os/freebsd/zfs/zfs_dir.c | 27 +- .../openzfs/module/os/freebsd/zfs/zfs_file_os.c | 4 +- .../openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c | 17 + .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 44 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 606 +- .../openzfs/module/os/freebsd/zfs/zfs_znode.c | 117 +- .../openzfs/module/os/freebsd/zfs/zio_crypt.c | 19 +- .../openzfs/module/os/freebsd/zfs/zvol_os.c | 14 +- .../openzfs/module/os/linux/spl/spl-generic.c | 4 +- .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 11 +- sys/contrib/openzfs/module/os/linux/spl/spl-kmem.c | 14 + sys/contrib/openzfs/module/os/linux/spl/spl-proc.c | 105 +- .../openzfs/module/os/linux/spl/spl-thread.c | 51 + sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_file_os.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_ioctl_os.c | 87 +- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 8 - .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 34 +- .../openzfs/module/os/linux/zfs/zfs_znode.c | 8 +- .../openzfs/module/os/linux/zfs/zio_crypt.c | 17 +- .../openzfs/module/os/linux/zfs/zpl_export.c | 12 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 5 +- .../openzfs/module/os/linux/zfs/zpl_inode.c | 41 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 39 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 2 + sys/contrib/openzfs/module/unicode/u8_textprep.c | 2 +- sys/contrib/openzfs/module/zcommon/zfs_comutil.c | 2 +- .../openzfs/module/zcommon/zfs_fletcher_avx512.c | 8 +- sys/contrib/openzfs/module/zcommon/zfs_namecheck.c | 6 - sys/contrib/openzfs/module/zcommon/zfs_prop.c | 6 +- sys/contrib/openzfs/module/zfs/abd.c | 2 +- sys/contrib/openzfs/module/zfs/aggsum.c | 125 +- sys/contrib/openzfs/module/zfs/arc.c | 84 +- sys/contrib/openzfs/module/zfs/dataset_kstats.c | 48 +- sys/contrib/openzfs/module/zfs/dbuf.c | 2 - sys/contrib/openzfs/module/zfs/dmu_recv.c | 4 +- sys/contrib/openzfs/module/zfs/dmu_traverse.c | 67 +- sys/contrib/openzfs/module/zfs/dnode.c | 8 +- sys/contrib/openzfs/module/zfs/dsl_bookmark.c | 6 +- sys/contrib/openzfs/module/zfs/dsl_crypt.c | 11 +- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 65 +- sys/contrib/openzfs/module/zfs/dsl_scan.c | 42 +- sys/contrib/openzfs/module/zfs/fm.c | 321 +- sys/contrib/openzfs/module/zfs/spa.c | 92 +- sys/contrib/openzfs/module/zfs/spa_log_spacemap.c | 2 +- sys/contrib/openzfs/module/zfs/vdev.c | 14 +- sys/contrib/openzfs/module/zfs/vdev_draid.c | 49 +- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 12 +- sys/contrib/openzfs/module/zfs/vdev_mirror.c | 9 + sys/contrib/openzfs/module/zfs/vdev_raidz.c | 11 +- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_removal.c | 4 - sys/contrib/openzfs/module/zfs/zfs_fm.c | 8 +- sys/contrib/openzfs/module/zfs/zfs_ioctl.c | 120 +- sys/contrib/openzfs/module/zfs/zio.c | 32 +- sys/contrib/openzfs/module/zfs/zvol.c | 4 - sys/contrib/openzfs/module/zstd/README.md | 2 +- .../module/zstd/include/zstd_compat_wrapper.h | 2 +- sys/contrib/openzfs/module/zstd/zfs_zstd.c | 4 +- sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 2 +- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 64 +- sys/contrib/openzfs/rpm/redhat/zfs-kmod.spec.in | 5 +- sys/contrib/openzfs/scripts/Makefile.am | 17 +- sys/contrib/openzfs/scripts/commitcheck.sh | 4 +- sys/contrib/openzfs/scripts/dkms.mkconf | 12 +- sys/contrib/openzfs/scripts/dkms.postbuild | 7 +- sys/contrib/openzfs/scripts/kmodtool | 30 +- sys/contrib/openzfs/scripts/make_gitrev.sh | 4 +- sys/contrib/openzfs/scripts/mancheck.sh | 43 + sys/contrib/openzfs/scripts/paxcheck.sh | 3 +- sys/contrib/openzfs/scripts/zfs-tests.sh | 1 - sys/contrib/openzfs/scripts/zfs.sh | 4 +- sys/contrib/openzfs/scripts/zimport.sh | 23 +- sys/contrib/openzfs/scripts/zloop.sh | 17 +- sys/contrib/openzfs/tests/Makefile.am | 5 + sys/contrib/openzfs/tests/runfiles/common.run | 29 +- sys/contrib/openzfs/tests/runfiles/linux.run | 8 +- sys/contrib/openzfs/tests/runfiles/sanity.run | 5 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 25 +- .../openzfs/tests/test-runner/man/test-runner.1 | 598 +- .../openzfs/tests/zfs-tests/cmd/draid/draid.c | 8 +- .../tests/zfs-tests/cmd/file_check/file_check.c | 3 - .../tests/zfs-tests/cmd/file_write/file_write.c | 2 +- .../tests/zfs-tests/cmd/xattrtest/xattrtest.c | 2 +- .../openzfs/tests/zfs-tests/include/libtest.shlib | 58 +- .../openzfs/tests/zfs-tests/include/tunables.cfg | 1 + .../tests/functional/atime/root_atime_off.ksh | 2 +- .../tests/functional/atime/root_atime_on.ksh | 2 +- .../tests/functional/atime/root_relatime_on.ksh | 2 +- .../tests/functional/cli_root/zdb/zdb_checksum.ksh | 1 + .../functional/cli_root/zdb/zdb_objset_id.ksh | 1 + .../zfs_destroy/zfs_clone_livelist_dedup.ksh | 88 + .../cli_root/zfs_destroy/zfs_destroy_015_pos.ksh | 2 +- .../cli_root/zfs_get/zfs_get_001_pos.ksh | 12 +- .../cli_root/zfs_get/zfs_get_common.kshlib | 10 +- .../tests/functional/cli_root/zfs_load-key/HEXKEY | 1 + .../functional/cli_root/zfs_load-key/Makefile.am | 6 +- .../functional/cli_root/zfs_load-key/PASSPHRASE | 1 + .../tests/functional/cli_root/zfs_load-key/RAWKEY | 1 + .../functional/cli_root/zfs_load-key/cleanup.ksh | 2 + .../functional/cli_root/zfs_load-key/setup.ksh | 5 +- .../cli_root/zfs_load-key/zfs_load-key.cfg | 31 + .../cli_root/zfs_load-key/zfs_load-key_all.ksh | 10 + .../zfs_load-key/zfs_load-key_common.kshlib | 63 + .../cli_root/zfs_load-key/zfs_load-key_https.ksh | 78 + .../zfs_load-key/zfs_load-key_location.ksh | 5 + .../zfs_load-key/zfs_load-key_recursive.ksh | 6 + .../cli_root/zfs_mount/zfs_mount_test_race.ksh | 9 +- .../zfs_receive/receive-o-x_props_override.ksh | 15 +- .../tests/functional/cli_root/zfs_send/Makefile.am | 3 +- .../cli_root/zfs_send/zfs_send_skip_missing.ksh | 77 + .../cli_root/zfs_set/zfs_set_keylocation.ksh | 23 +- .../cli_root/zpool_add/zpool_add_dryrun_output.ksh | 4 +- .../zpool_events/zpool_events_duplicates.ksh | 3 +- .../cli_user/misc/arc_summary_001_pos.ksh | 3 + .../cli_user/zfs_list/zfs_list_002_pos.ksh | 2 +- .../zpool_iostat/zpool_iostat_-c_homedir.ksh | 2 +- .../zpool_iostat/zpool_iostat_-c_searchpath.ksh | 2 +- .../zpool_status/zpool_status_-c_homedir.ksh | 2 +- .../zpool_status/zpool_status_-c_searchpath.ksh | 2 +- .../zfs-tests/tests/functional/deadman/Makefile.am | 1 + .../tests/functional/deadman/deadman_ratelimit.ksh | 78 + .../tests/functional/deadman/deadman_sync.ksh | 6 +- .../zfs-tests/tests/functional/events/.gitignore | 1 + .../zfs-tests/tests/functional/events/Makefile.am | 9 +- .../zfs-tests/tests/functional/events/cleanup.ksh | 2 +- .../tests/functional/events/events_002_pos.ksh | 4 +- .../tests/functional/events/zed_fd_spill-zedlet.c | 36 + .../tests/functional/events/zed_fd_spill.ksh | 77 + .../tests/functional/events/zed_rc_filter.ksh | 1 + .../functional/fault/auto_offline_001_pos.ksh | 4 +- .../pool_checkpoint/checkpoint_big_rewind.ksh | 3 +- .../pool_checkpoint/checkpoint_capacity.ksh | 7 +- .../pool_checkpoint/checkpoint_discard_busy.ksh | 3 +- .../pool_checkpoint/pool_checkpoint.kshlib | 9 +- .../functional/pool_names/pool_names_002_neg.ksh | 8 +- .../tests/functional/redundancy/Makefile.am | 2 + .../tests/functional/redundancy/redundancy.kshlib | 24 +- .../functional/redundancy/redundancy_draid.ksh | 248 + .../functional/redundancy/redundancy_draid3.ksh | 2 +- .../redundancy/redundancy_draid_damaged.ksh | 153 + .../redundancy/redundancy_draid_spare1.ksh | 31 +- .../redundancy/redundancy_draid_spare3.ksh | 46 +- .../functional/redundancy/redundancy_raidz.ksh | 52 +- .../functional/redundancy/redundancy_stripe.ksh | 4 +- .../functional/removal/removal_condense_export.ksh | 2 + .../functional/removal/removal_with_export.ksh | 2 +- .../functional/replacement/attach_multiple.ksh | 6 +- .../functional/replacement/replace_import.ksh | 2 +- .../replacement/resilver_restart_001.ksh | 2 +- .../functional/reservation/reservation_006_pos.ksh | 2 +- .../functional/rsend/send_encrypted_files.ksh | 2 +- .../zfs-tests/tests/functional/slog/cleanup.ksh | 4 - .../zfs-tests/tests/functional/slog/setup.ksh | 4 - .../tests/functional/userquota/Makefile.am | 3 +- .../userquota/userspace_send_encrypted.ksh | 108 - .../tests/functional/xattr/xattr_002_neg.ksh | 4 +- .../zfs-tests/tests/perf/scripts/prefetch_io.sh | 42 +- sys/contrib/openzfs/udev/rules.d/.gitignore | 5 +- sys/modules/zfs/zfs_config.h | 6 +- 523 files changed, 31415 insertions(+), 28284 deletions(-) diff --cc cddl/share/zfs/compatibility.d/Makefile index 8bc18bcd6391,000000000000..255f4a3542b3 mode 100644,000000..100644 --- a/cddl/share/zfs/compatibility.d/Makefile +++ b/cddl/share/zfs/compatibility.d/Makefile @@@ -1,49 -1,0 +1,53 @@@ +# $FreeBSD$ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/cmd/zpool/compatibility.d + +FILES= \ + compat-2018 \ + compat-2019 \ + compat-2020 \ + compat-2021 \ + freebsd-11.0 \ + freebsd-11.2 \ + freebsd-11.3 \ + freenas-9.10.2 \ + grub2 \ + openzfsonosx-1.7.0 \ + openzfsonosx-1.8.1 \ + openzfsonosx-1.9.3 \ + openzfs-2.0-freebsd \ + openzfs-2.0-linux \ ++ openzfs-2.1-freebsd \ ++ openzfs-2.1-linux \ ++ zol-0.6.1 \ ++ zol-0.6.4 \ + zol-0.6.5 \ + zol-0.7 \ + zol-0.8 + +FILESDIR= ${SHAREDIR}/zfs/compatibility.d + +LINKS= \ + ${FILESDIR}/compat-2018 ${FILESDIR}/2018 \ + ${FILESDIR}/compat-2019 ${FILESDIR}/2019 \ + ${FILESDIR}/compat-2020 ${FILESDIR}/2020 \ + ${FILESDIR}/compat-2021 ${FILESDIR}/2021 \ + ${FILESDIR}/freebsd-11.0 ${FILESDIR}/freebsd-11.1 \ + ${FILESDIR}/freebsd-11.0 ${FILESDIR}/freenas-11.0 \ + ${FILESDIR}/freebsd-11.2 ${FILESDIR}/freenas-11.2 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-11.4 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.0 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.1 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freebsd-12.2 \ + ${FILESDIR}/freebsd-11.3 ${FILESDIR}/freenas-11.3 \ + ${FILESDIR}/freenas-11.0 ${FILESDIR}/freenas-11.1 \ + ${FILESDIR}/openzfsonosx-1.9.3 ${FILESDIR}/openzfsonosx-1.9.4 \ + ${FILESDIR}/openzfs-2.0-freebsd ${FILESDIR}/truenas-12.0 \ + ${FILESDIR}/zol-0.7 ${FILESDIR}/ubuntu-18.04 \ + ${FILESDIR}/zol-0.8 ${FILESDIR}/ubuntu-20.04 + +LINKMODE= ${NOBINMODE} + +.include diff --cc sys/contrib/openzfs/RELEASES.md index 000000000000,55bfdb80ef6e..55bfdb80ef6e mode 000000,100644..100644 --- a/sys/contrib/openzfs/RELEASES.md +++ b/sys/contrib/openzfs/RELEASES.md diff --cc sys/contrib/openzfs/cmd/fsck_zfs/.gitignore index 000000000000,0edf0309e94a..0edf0309e94a mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/fsck_zfs/.gitignore +++ b/sys/contrib/openzfs/cmd/fsck_zfs/.gitignore diff --cc sys/contrib/openzfs/cmd/fsck_zfs/fsck.zfs.in index 000000000000,37096902cb94..37096902cb94 mode 000000,100755..100755 --- a/sys/contrib/openzfs/cmd/fsck_zfs/fsck.zfs.in +++ b/sys/contrib/openzfs/cmd/fsck_zfs/fsck.zfs.in diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.1-freebsd index 000000000000,9fde997e8c60..9fde997e8c60 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.1-freebsd +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.1-freebsd diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.1-linux index 000000000000,c3ff176bf8f2..c3ff176bf8f2 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.1-linux +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.1-linux diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.1 index 000000000000,9bc963ddccab..9bc963ddccab mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.1 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.1 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.4 index 000000000000,82a2698c8c5c..82a2698c8c5c mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.4 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.4 diff --cc sys/contrib/openzfs/config/Shellcheck.am index 000000000000,6b805b797d12..6b805b797d12 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/Shellcheck.am +++ b/sys/contrib/openzfs/config/Shellcheck.am diff --cc sys/contrib/openzfs/config/always-shellcheck.m4 index 000000000000,2a9a099746f4..2a9a099746f4 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/always-shellcheck.m4 +++ b/sys/contrib/openzfs/config/always-shellcheck.m4 diff --cc sys/contrib/openzfs/config/kernel-siginfo.m4 index 000000000000,6ddb0dcc37d2..6ddb0dcc37d2 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-siginfo.m4 +++ b/sys/contrib/openzfs/config/kernel-siginfo.m4 diff --cc sys/contrib/openzfs/config/kernel-signal-stop.m4 index 000000000000,6cb86e7c4cde..6cb86e7c4cde mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-signal-stop.m4 +++ b/sys/contrib/openzfs/config/kernel-signal-stop.m4 diff --cc sys/contrib/openzfs/config/kernel-special-state.m4 index 000000000000,aa60aabebc43..aa60aabebc43 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-special-state.m4 +++ b/sys/contrib/openzfs/config/kernel-special-state.m4 diff --cc sys/contrib/openzfs/config/user-libatomic.m4 index 000000000000,14a60bbea9d0..14a60bbea9d0 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/user-libatomic.m4 +++ b/sys/contrib/openzfs/config/user-libatomic.m4 diff --cc sys/contrib/openzfs/config/user-libfetch.m4 index 000000000000,f5149fc1a5d7..f5149fc1a5d7 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/user-libfetch.m4 +++ b/sys/contrib/openzfs/config/user-libfetch.m4 diff --cc sys/contrib/openzfs/contrib/bash_completion.d/.gitignore index 000000000000,0fd9cc63af2a..0fd9cc63af2a mode 000000,100644..100644 --- a/sys/contrib/openzfs/contrib/bash_completion.d/.gitignore +++ b/sys/contrib/openzfs/contrib/bash_completion.d/.gitignore diff --cc sys/contrib/openzfs/etc/systemd/system-generators/zfs-mount-generator.c index 000000000000,b806339deb2f..b806339deb2f mode 000000,100644..100644 --- a/sys/contrib/openzfs/etc/systemd/system-generators/zfs-mount-generator.c +++ b/sys/contrib/openzfs/etc/systemd/system-generators/zfs-mount-generator.c diff --cc sys/contrib/openzfs/include/os/freebsd/spl/sys/wmsum.h index 000000000000,9fdd1901b7ee..9fdd1901b7ee mode 000000,100644..100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/wmsum.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/wmsum.h diff --cc sys/contrib/openzfs/include/os/linux/spl/sys/wmsum.h index 000000000000,0871bd69504c..0871bd69504c mode 000000,100644..100644 --- a/sys/contrib/openzfs/include/os/linux/spl/sys/wmsum.h +++ b/sys/contrib/openzfs/include/os/linux/spl/sys/wmsum.h diff --cc sys/contrib/openzfs/lib/libshare/nfs.c index 000000000000,44d3e93d42f0..44d3e93d42f0 mode 000000,100644..100644 --- a/sys/contrib/openzfs/lib/libshare/nfs.c +++ b/sys/contrib/openzfs/lib/libshare/nfs.c diff --cc sys/contrib/openzfs/lib/libspl/include/sys/wmsum.h index 000000000000,0679af73ce91..0679af73ce91 mode 000000,100644..100644 --- a/sys/contrib/openzfs/lib/libspl/include/sys/wmsum.h +++ b/sys/contrib/openzfs/lib/libspl/include/sys/wmsum.h diff --cc sys/contrib/openzfs/lib/libspl/libspl_impl.h index 000000000000,cda56e64c962..cda56e64c962 mode 000000,100644..100644 --- a/sys/contrib/openzfs/lib/libspl/libspl_impl.h +++ b/sys/contrib/openzfs/lib/libspl/libspl_impl.h diff --cc sys/contrib/openzfs/man/man8/zstreamdump.8 index f499be442a47,c6721daf11de..c6721daf11de mode 100644,120000..120000 --- a/sys/contrib/openzfs/man/man8/zstreamdump.8 +++ b/sys/contrib/openzfs/man/man8/zstreamdump.8 diff --cc sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c index 0491b2ff3e28,6a59c0eae766..3eb5cd490d03 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_znode.c @@@ -1247,12 -1269,16 +1269,21 @@@ zfs_znode_free(znode_t *zp list_remove(&zfsvfs->z_all_znodes, zp); zfsvfs->z_nr_znodes--; mutex_exit(&zfsvfs->z_znodes_lock); + symlink = atomic_load_ptr(&zp->z_cached_symlink); + if (symlink != NULL) { + atomic_store_rel_ptr((uintptr_t *)&zp->z_cached_symlink, (uintptr_t)NULL); + cache_symlink_free(symlink, strlen(symlink) + 1); + } + #if __FreeBSD_version >= 1300139 + symlink = atomic_load_ptr(&zp->z_cached_symlink); + if (symlink != NULL) { + atomic_store_rel_ptr((uintptr_t *)&zp->z_cached_symlink, + (uintptr_t)NULL); + cache_symlink_free(symlink, strlen(symlink) + 1); + } + #endif + if (zp->z_acl_cached) { zfs_acl_free(zp->z_acl_cached); zp->z_acl_cached = NULL; diff --cc sys/contrib/openzfs/scripts/mancheck.sh index 000000000000,6ae1fc5becff..6ae1fc5becff mode 000000,100755..100755 --- a/sys/contrib/openzfs/scripts/mancheck.sh +++ b/sys/contrib/openzfs/scripts/mancheck.sh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_dedup.ksh index 000000000000,5f356967a457..5f356967a457 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_dedup.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_destroy/zfs_clone_livelist_dedup.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/HEXKEY index 000000000000,95ed1c051a21..95ed1c051a21 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/HEXKEY +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/HEXKEY diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/PASSPHRASE index 000000000000,f3097ab13082..f3097ab13082 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/PASSPHRASE +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/PASSPHRASE diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/RAWKEY index 000000000000,f2d4cbf581ce..f2d4cbf581ce mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/RAWKEY +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/RAWKEY diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_https.ksh index 000000000000,cac9c4140322..cac9c4140322 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_https.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/zfs_load-key_https.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_skip_missing.ksh index 000000000000,b367cef9c4a4..b367cef9c4a4 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_skip_missing.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_skip_missing.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/deadman/deadman_ratelimit.ksh index 000000000000,469117a56cc0..469117a56cc0 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/deadman/deadman_ratelimit.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/deadman/deadman_ratelimit.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/.gitignore index 000000000000,ed5af03a1095..ed5af03a1095 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/.gitignore +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/.gitignore diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_fd_spill-zedlet.c index 000000000000,c072f906d23e..c072f906d23e mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_fd_spill-zedlet.c +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_fd_spill-zedlet.c diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_fd_spill.ksh index 000000000000,8736a7fdf7e6..8736a7fdf7e6 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_fd_spill.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/events/zed_fd_spill.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh index 000000000000,8015e682c892..8015e682c892 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged.ksh index 000000000000,6796cc78a1bd..6796cc78a1bd mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_damaged.ksh diff --cc sys/modules/zfs/zfs_config.h index ebc9bbe9059b,000000000000..1400d9fe92c0 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,774 -1,0 +1,774 @@@ +/* + * $FreeBSD$ + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ *** 646 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Tue Jun 8 15:01:15 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D6F2E638BE2; Tue, 8 Jun 2021 15:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FztjR5nSRz3HVD; Tue, 8 Jun 2021 15:01: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 AF31E3198; Tue, 8 Jun 2021 15:01: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 158F1Fdv035967; Tue, 8 Jun 2021 15:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158F1F72035966; Tue, 8 Jun 2021 15:01:15 GMT (envelope-from git) Date: Tue, 8 Jun 2021 15:01:15 GMT Message-Id: <202106081501.158F1F72035966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b38239433258 - main - updating: add note about vendor/openzfs branch rename MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b38239433258683bdd45a5627815a56ea6e79b64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 15:01:15 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b38239433258683bdd45a5627815a56ea6e79b64 commit b38239433258683bdd45a5627815a56ea6e79b64 Author: Warner Losh AuthorDate: 2021-06-08 14:57:42 +0000 Commit: Warner Losh CommitDate: 2021-06-08 15:00:57 +0000 updating: add note about vendor/openzfs branch rename Add a pointer to https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html to explain how to pull a new tree due to the vendor/openzfs branch being renamed. Reviewed by: lwhsu@ Sponsored by: Netflix --- UPDATING | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UPDATING b/UPDATING index f1ff8a8b64b1..c9e081563e6c 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20210608: + The vendor/openzfs branch was renamed to vnedor/openzfs/legacy to + start tracking OpenZFS upstream more closely. Please see +https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html + for details on how to correct any errors that might result. The + short version is that you need to remove the old branch locally: + git update-ref -d refs/remotes/freebsd/vendor/openzfs + (assuming your upstream origin is named 'freebsd'). + 20210525: Commits 17accc08ae15 and de102f870501 add new files to LinuxKPI which break drm-kmod. In addition various other additions where From owner-dev-commits-src-main@freebsd.org Tue Jun 8 15:52:44 2021 Return-Path: Delivered-To: dev-commits-src-main@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 96525639EC2; Tue, 8 Jun 2021 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzvrr3rX6z3QJy; Tue, 8 Jun 2021 15:52:44 +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 6C33D3B68; Tue, 8 Jun 2021 15:52:44 +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 158FqiO4005296; Tue, 8 Jun 2021 15:52:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158FqiXP005295; Tue, 8 Jun 2021 15:52:44 GMT (envelope-from git) Date: Tue, 8 Jun 2021 15:52:44 GMT Message-Id: <202106081552.158FqiXP005295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: f0f7b0868a94 - main - Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0f7b0868a94d33ca3362702832b772bc01c65d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 15:52:44 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=f0f7b0868a94d33ca3362702832b772bc01c65d6 commit f0f7b0868a94d33ca3362702832b772bc01c65d6 Author: Marcin Wojtas AuthorDate: 2021-05-27 08:05:35 +0000 Commit: Marcin Wojtas CommitDate: 2021-06-08 15:51:11 +0000 Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.c ThunderX is the only board known to use them. Move them to the ThunderX PCIe driver. Submitted by: Kornel Duleba Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30179 --- sys/arm64/cavium/thunder_pcie_fdt.c | 164 +++++++++++++++++++++++++++++++-- sys/dev/pci/pci_host_generic_fdt.c | 178 +----------------------------------- 2 files changed, 158 insertions(+), 184 deletions(-) diff --git a/sys/arm64/cavium/thunder_pcie_fdt.c b/sys/arm64/cavium/thunder_pcie_fdt.c index 115b89b67b88..b89b4e345d31 100644 --- a/sys/arm64/cavium/thunder_pcie_fdt.c +++ b/sys/arm64/cavium/thunder_pcie_fdt.c @@ -59,23 +59,43 @@ __FBSDID("$FreeBSD$"); #ifdef THUNDERX_PASS_1_1_ERRATA static struct resource * thunder_pcie_fdt_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int thunder_pcie_fdt_release_resource(device_t, device_t, + int, int, struct resource*); #endif static int thunder_pcie_fdt_attach(device_t); static int thunder_pcie_fdt_probe(device_t); static int thunder_pcie_fdt_get_id(device_t, device_t, enum pci_id_type, uintptr_t *); +static const struct ofw_bus_devinfo *thunder_pcie_ofw_get_devinfo(device_t, + device_t); + +/* OFW bus interface */ +struct thunder_pcie_ofw_devinfo { + struct ofw_bus_devinfo di_dinfo; + struct resource_list di_rl; +}; + static device_method_t thunder_pcie_fdt_methods[] = { /* Device interface */ DEVMETHOD(device_probe, thunder_pcie_fdt_probe), DEVMETHOD(device_attach, thunder_pcie_fdt_attach), #ifdef THUNDERX_PASS_1_1_ERRATA DEVMETHOD(bus_alloc_resource, thunder_pcie_fdt_alloc_resource), + DEVMETHOD(bus_release_resource, thunder_pcie_fdt_release_resource), #endif /* pcib interface */ DEVMETHOD(pcib_get_id, thunder_pcie_fdt_get_id), + /* ofw interface */ + DEVMETHOD(ofw_bus_get_devinfo, thunder_pcie_ofw_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + /* End */ DEVMETHOD_END }; @@ -90,6 +110,70 @@ DRIVER_MODULE(thunder_pcib, simplebus, thunder_pcie_fdt_driver, DRIVER_MODULE(thunder_pcib, ofwbus, thunder_pcie_fdt_driver, thunder_pcie_fdt_devclass, 0, 0); +static const struct ofw_bus_devinfo * +thunder_pcie_ofw_get_devinfo(device_t bus __unused, device_t child) +{ + struct thunder_pcie_ofw_devinfo *di; + + di = device_get_ivars(child); + return (&di->di_dinfo); +} + +static void +get_addr_size_cells(phandle_t node, pcell_t *addr_cells, pcell_t *size_cells) +{ + + *addr_cells = 2; + /* Find address cells if present */ + OF_getencprop(node, "#address-cells", addr_cells, sizeof(*addr_cells)); + + *size_cells = 2; + /* Find size cells if present */ + OF_getencprop(node, "#size-cells", size_cells, sizeof(*size_cells)); +} + +static int +thunder_pcie_ofw_bus_attach(device_t dev) +{ + struct thunder_pcie_ofw_devinfo *di; + device_t child; + phandle_t parent, node; + pcell_t addr_cells, size_cells; + + parent = ofw_bus_get_node(dev); + if (parent > 0) { + get_addr_size_cells(parent, &addr_cells, &size_cells); + /* Iterate through all bus subordinates */ + for (node = OF_child(parent); node > 0; node = OF_peer(node)) { + /* Allocate and populate devinfo. */ + di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node) != 0) { + free(di, M_DEVBUF); + continue; + } + + /* Initialize and populate resource list. */ + resource_list_init(&di->di_rl); + ofw_bus_reg_to_rl(dev, node, addr_cells, size_cells, + &di->di_rl); + ofw_bus_intr_to_rl(dev, node, &di->di_rl, NULL); + + /* Add newbus device for this FDT node */ + child = device_add_child(dev, NULL, -1); + if (child == NULL) { + resource_list_free(&di->di_rl); + ofw_bus_gen_destroy_devinfo(&di->di_dinfo); + free(di, M_DEVBUF); + continue; + } + + device_set_ivars(child, di); + } + } + + return (0); +} + static int thunder_pcie_fdt_probe(device_t dev) { @@ -121,6 +205,10 @@ thunder_pcie_fdt_attach(device_t dev) thunder_pcie_identify_ecam(dev, &sc->base.ecam); sc->base.coherent = 1; + /* Attach OFW bus */ + if (thunder_pcie_ofw_bus_attach(dev) != 0) + return (ENXIO); + return (pci_host_generic_attach(dev)); } @@ -145,16 +233,76 @@ thunder_pcie_fdt_get_id(device_t pci, device_t child, enum pci_id_type type, } #ifdef THUNDERX_PASS_1_1_ERRATA -static struct resource * -thunder_pcie_fdt_alloc_resource(device_t dev, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +struct resource * +thunder_pcie_fdt_alloc_resource(device_t dev, device_t child, int type, + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + struct generic_pcie_fdt_softc *sc; + struct thunder_pcie_ofw_devinfo *di; + struct resource_list_entry *rle; + int i; + + /* + * For PCIe devices that do not have FDT nodes pass + * the request to the core driver. + */ + if ((int)ofw_bus_get_node(child) <= 0) + return (thunder_pcie_alloc_resource(dev, child, type, + rid, start, end, count, flags)); + + /* For other devices use OFW method */ + sc = device_get_softc(dev); + + if (RMAN_IS_DEFAULT_RANGE(start, end)) { + if ((di = device_get_ivars(child)) == NULL) + return (NULL); + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + + /* Find defaults for this rid */ + rle = resource_list_find(&di->di_rl, type, *rid); + if (rle == NULL) + return (NULL); + + start = rle->start; + end = rle->end; + count = rle->count; + } + + if (type == SYS_RES_MEMORY) { + /* Remap through ranges property */ + for (i = 0; i < MAX_RANGES_TUPLES; i++) { + if (start >= sc->base.ranges[i].phys_base && + end < (sc->base.ranges[i].pci_base + + sc->base.ranges[i].size)) { + start -= sc->base.ranges[i].phys_base; + start += sc->base.ranges[i].pci_base; + end -= sc->base.ranges[i].phys_base; + end += sc->base.ranges[i].pci_base; + break; + } + } + + if (i == MAX_RANGES_TUPLES) { + device_printf(dev, "Could not map resource " + "%#jx-%#jx\n", start, end); + return (NULL); + } + } + + return (bus_generic_alloc_resource(dev, child, type, rid, start, + end, count, flags)); +} + +static int +thunder_pcie_fdt_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *res) { - if ((int)ofw_bus_get_node(child) > 0) - return (pci_host_generic_alloc_resource(dev, child, - type, rid, start, end, count, flags)); + if ((int)ofw_bus_get_node(child) <= 0) + return (pci_host_generic_core_release_resource(dev, child, type, + rid, res)); - return (thunder_pcie_alloc_resource(dev, child, - type, rid, start, end, count, flags)); + return (bus_generic_release_resource(dev, child, type, rid, res)); } #endif diff --git a/sys/dev/pci/pci_host_generic_fdt.c b/sys/dev/pci/pci_host_generic_fdt.c index 48e032ad4389..26047135164c 100644 --- a/sys/dev/pci/pci_host_generic_fdt.c +++ b/sys/dev/pci/pci_host_generic_fdt.c @@ -71,34 +71,10 @@ __FBSDID("$FreeBSD$"); #define PROPS_CELL_SIZE 1 #define PCI_ADDR_CELL_SIZE 2 -/* OFW bus interface */ -struct generic_pcie_ofw_devinfo { - struct ofw_bus_devinfo di_dinfo; - struct resource_list di_rl; -}; - /* Forward prototypes */ static int generic_pcie_fdt_probe(device_t dev); static int parse_pci_mem_ranges(device_t, struct generic_pcie_core_softc *); -static int generic_pcie_fdt_release_resource(device_t dev, device_t child, - int type, int rid, struct resource *res); -static int generic_pcie_ofw_bus_attach(device_t); -static const struct ofw_bus_devinfo *generic_pcie_ofw_get_devinfo(device_t, - device_t); - -static __inline void -get_addr_size_cells(phandle_t node, pcell_t *addr_cells, pcell_t *size_cells) -{ - - *addr_cells = 2; - /* Find address cells if present */ - OF_getencprop(node, "#address-cells", addr_cells, sizeof(*addr_cells)); - - *size_cells = 2; - /* Find size cells if present */ - OF_getencprop(node, "#size-cells", size_cells, sizeof(*size_cells)); -} static int generic_pcie_fdt_probe(device_t dev) @@ -134,10 +110,6 @@ pci_host_generic_setup_fdt(device_t dev) if (parse_pci_mem_ranges(dev, &sc->base)) return (ENXIO); - /* Attach OFW bus */ - if (generic_pcie_ofw_bus_attach(dev) != 0) - return (ENXIO); - node = ofw_bus_get_node(dev); if (sc->base.coherent == 0) { sc->base.coherent = OF_hasprop(node, "dma-coherent"); @@ -284,93 +256,6 @@ generic_pcie_fdt_route_interrupt(device_t bus, device_t dev, int pin) return (PCI_INVALID_IRQ); } -static int -generic_pcie_fdt_release_resource(device_t dev, device_t child, int type, - int rid, struct resource *res) -{ - -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) { - return (pci_host_generic_core_release_resource(dev, child, type, - rid, res)); - } -#endif - - /* For PCIe devices that do not have FDT nodes, use PCIB method */ - if ((int)ofw_bus_get_node(child) <= 0) { - return (pci_host_generic_core_release_resource(dev, child, type, - rid, res)); - } - - /* For other devices use OFW method */ - return (bus_generic_release_resource(dev, child, type, rid, res)); -} - -struct resource * -pci_host_generic_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) -{ - struct generic_pcie_fdt_softc *sc; - struct generic_pcie_ofw_devinfo *di; - struct resource_list_entry *rle; - int i; - -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) { - return (pci_host_generic_core_alloc_resource(dev, child, type, rid, - start, end, count, flags)); - } -#endif - - /* For PCIe devices that do not have FDT nodes, use PCIB method */ - if ((int)ofw_bus_get_node(child) <= 0) - return (pci_host_generic_core_alloc_resource(dev, child, type, - rid, start, end, count, flags)); - - /* For other devices use OFW method */ - sc = device_get_softc(dev); - - if (RMAN_IS_DEFAULT_RANGE(start, end)) { - if ((di = device_get_ivars(child)) == NULL) - return (NULL); - if (type == SYS_RES_IOPORT) - type = SYS_RES_MEMORY; - - /* Find defaults for this rid */ - rle = resource_list_find(&di->di_rl, type, *rid); - if (rle == NULL) - return (NULL); - - start = rle->start; - end = rle->end; - count = rle->count; - } - - if (type == SYS_RES_MEMORY) { - /* Remap through ranges property */ - for (i = 0; i < MAX_RANGES_TUPLES; i++) { - if (start >= sc->base.ranges[i].phys_base && - end < (sc->base.ranges[i].pci_base + - sc->base.ranges[i].size)) { - start -= sc->base.ranges[i].phys_base; - start += sc->base.ranges[i].pci_base; - end -= sc->base.ranges[i].phys_base; - end += sc->base.ranges[i].pci_base; - break; - } - } - - if (i == MAX_RANGES_TUPLES) { - device_printf(dev, "Could not map resource " - "%#jx-%#jx\n", start, end); - return (NULL); - } - } - - return (bus_generic_alloc_resource(dev, child, type, rid, start, - end, count, flags)); -} - static int generic_pcie_fdt_alloc_msi(device_t pci, device_t child, int count, int maxcount, int *irqs) @@ -482,64 +367,13 @@ generic_pcie_get_id(device_t pci, device_t child, enum pci_id_type type, return (0); } -static const struct ofw_bus_devinfo * -generic_pcie_ofw_get_devinfo(device_t bus __unused, device_t child) -{ - struct generic_pcie_ofw_devinfo *di; - - di = device_get_ivars(child); - return (&di->di_dinfo); -} - /* Helper functions */ -static int -generic_pcie_ofw_bus_attach(device_t dev) -{ - struct generic_pcie_ofw_devinfo *di; - device_t child; - phandle_t parent, node; - pcell_t addr_cells, size_cells; - - parent = ofw_bus_get_node(dev); - if (parent > 0) { - get_addr_size_cells(parent, &addr_cells, &size_cells); - /* Iterate through all bus subordinates */ - for (node = OF_child(parent); node > 0; node = OF_peer(node)) { - /* Allocate and populate devinfo. */ - di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO); - if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node) != 0) { - free(di, M_DEVBUF); - continue; - } - - /* Initialize and populate resource list. */ - resource_list_init(&di->di_rl); - ofw_bus_reg_to_rl(dev, node, addr_cells, size_cells, - &di->di_rl); - ofw_bus_intr_to_rl(dev, node, &di->di_rl, NULL); - - /* Add newbus device for this FDT node */ - child = device_add_child(dev, NULL, -1); - if (child == NULL) { - resource_list_free(&di->di_rl); - ofw_bus_gen_destroy_devinfo(&di->di_dinfo); - free(di, M_DEVBUF); - continue; - } - - device_set_ivars(child, di); - } - } - - return (0); -} - static device_method_t generic_pcie_fdt_methods[] = { DEVMETHOD(device_probe, generic_pcie_fdt_probe), DEVMETHOD(device_attach, pci_host_generic_attach), - DEVMETHOD(bus_alloc_resource, pci_host_generic_alloc_resource), - DEVMETHOD(bus_release_resource, generic_pcie_fdt_release_resource), + DEVMETHOD(bus_alloc_resource, pci_host_generic_core_alloc_resource), + DEVMETHOD(bus_release_resource, pci_host_generic_core_release_resource), /* pcib interface */ DEVMETHOD(pcib_route_interrupt, generic_pcie_fdt_route_interrupt), @@ -551,14 +385,6 @@ static device_method_t generic_pcie_fdt_methods[] = { DEVMETHOD(pcib_get_id, generic_pcie_get_id), DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), - /* ofw_bus interface */ - DEVMETHOD(ofw_bus_get_devinfo, generic_pcie_ofw_get_devinfo), - DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), - DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), - DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), - DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), - DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - DEVMETHOD_END }; From owner-dev-commits-src-main@freebsd.org Tue Jun 8 15:52:45 2021 Return-Path: Delivered-To: dev-commits-src-main@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 DD950639E4A; Tue, 8 Jun 2021 15:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzvrs4md1z3Qcx; Tue, 8 Jun 2021 15:52:45 +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 8D47A3BB9; Tue, 8 Jun 2021 15:52:45 +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 158Fqjmp005320; Tue, 8 Jun 2021 15:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158Fqj2L005319; Tue, 8 Jun 2021 15:52:45 GMT (envelope-from git) Date: Tue, 8 Jun 2021 15:52:45 GMT Message-Id: <202106081552.158Fqj2L005319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: ea52e815887b - main - pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea52e815887b48f7eb10219777dc89ee0d99e8b6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 15:52:46 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=ea52e815887b48f7eb10219777dc89ee0d99e8b6 commit ea52e815887b48f7eb10219777dc89ee0d99e8b6 Author: Marcin Wojtas AuthorDate: 2021-05-27 08:07:19 +0000 Commit: Marcin Wojtas CommitDate: 2021-06-08 15:51:40 +0000 pci_host_generic_fdt.c: Add support for mapping dts nodes to PCI devices Some arm64 SoCs have nodes in their fdts that describe devices connected to the internal PCI bus. One such SoC is Freescale LS1028A. It expects the nodes to be mapped to devices enumerated using the standard PCI method. Mapping is done by reading device and function ids from "reg" property. Information is dts is used to describe MDIO/PHY connected to a given interface. Submitted by: Kornel Duleba Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30180 --- sys/dev/pci/pci_host_generic_fdt.c | 78 ++++++++++++++++++++++++++++++++++++++ sys/dev/pci/pci_host_generic_fdt.h | 4 ++ 2 files changed, 82 insertions(+) diff --git a/sys/dev/pci/pci_host_generic_fdt.c b/sys/dev/pci/pci_host_generic_fdt.c index 26047135164c..cb77c0c674a9 100644 --- a/sys/dev/pci/pci_host_generic_fdt.c +++ b/sys/dev/pci/pci_host_generic_fdt.c @@ -71,10 +71,21 @@ __FBSDID("$FreeBSD$"); #define PROPS_CELL_SIZE 1 #define PCI_ADDR_CELL_SIZE 2 +struct pci_ofw_devinfo { + STAILQ_ENTRY(pci_ofw_devinfo) pci_ofw_link; + struct ofw_bus_devinfo di_dinfo; + uint8_t slot; + uint8_t func; + uint8_t bus; +}; + /* Forward prototypes */ static int generic_pcie_fdt_probe(device_t dev); static int parse_pci_mem_ranges(device_t, struct generic_pcie_core_softc *); +static int generic_pcie_ofw_bus_attach(device_t); +static const struct ofw_bus_devinfo *generic_pcie_ofw_get_devinfo(device_t, + device_t); static int generic_pcie_fdt_probe(device_t dev) @@ -104,12 +115,18 @@ pci_host_generic_setup_fdt(device_t dev) sc = device_get_softc(dev); + STAILQ_INIT(&sc->pci_ofw_devlist); + /* Retrieve 'ranges' property from FDT */ if (bootverbose) device_printf(dev, "parsing FDT for ECAM%d:\n", sc->base.ecam); if (parse_pci_mem_ranges(dev, &sc->base)) return (ENXIO); + /* Attach OFW bus */ + if (generic_pcie_ofw_bus_attach(dev) != 0) + return (ENXIO); + node = ofw_bus_get_node(dev); if (sc->base.coherent == 0) { sc->base.coherent = OF_hasprop(node, "dma-coherent"); @@ -367,8 +384,62 @@ generic_pcie_get_id(device_t pci, device_t child, enum pci_id_type type, return (0); } +static const struct ofw_bus_devinfo * +generic_pcie_ofw_get_devinfo(device_t bus, device_t child) +{ + struct generic_pcie_fdt_softc *sc; + struct pci_ofw_devinfo *di; + uint8_t slot, func, busno; + + sc = device_get_softc(bus); + slot = pci_get_slot(child); + func = pci_get_function(child); + busno = pci_get_bus(child); + + STAILQ_FOREACH(di, &sc->pci_ofw_devlist, pci_ofw_link) + if (slot == di->slot && func == di->func && busno == di->bus) + return (&di->di_dinfo); + + return (NULL); +} + /* Helper functions */ +static int +generic_pcie_ofw_bus_attach(device_t dev) +{ + struct generic_pcie_fdt_softc *sc; + struct pci_ofw_devinfo *di; + phandle_t parent, node; + pcell_t reg[5]; + ssize_t len; + + sc = device_get_softc(dev); + parent = ofw_bus_get_node(dev); + if (parent == 0) + return (0); + + /* Iterate through all bus subordinates */ + for (node = OF_child(parent); node > 0; node = OF_peer(node)) { + len = OF_getencprop(node, "reg", reg, sizeof(reg)); + if (len != 5 * sizeof(pcell_t)) + continue; + + /* Allocate and populate devinfo. */ + di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO); + if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node) != 0) { + free(di, M_DEVBUF); + continue; + } + di->func = OFW_PCI_PHYS_HI_FUNCTION(reg[0]); + di->slot = OFW_PCI_PHYS_HI_DEVICE(reg[0]); + di->bus = OFW_PCI_PHYS_HI_BUS(reg[0]); + STAILQ_INSERT_TAIL(&sc->pci_ofw_devlist, di, pci_ofw_link); + } + + return (0); +} + static device_method_t generic_pcie_fdt_methods[] = { DEVMETHOD(device_probe, generic_pcie_fdt_probe), DEVMETHOD(device_attach, pci_host_generic_attach), @@ -385,6 +456,13 @@ static device_method_t generic_pcie_fdt_methods[] = { DEVMETHOD(pcib_get_id, generic_pcie_get_id), DEVMETHOD(pcib_request_feature, pcib_request_feature_allow), + DEVMETHOD(ofw_bus_get_devinfo, generic_pcie_ofw_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + DEVMETHOD_END }; diff --git a/sys/dev/pci/pci_host_generic_fdt.h b/sys/dev/pci/pci_host_generic_fdt.h index 5c3e18e9ad35..a5d75eddc84d 100644 --- a/sys/dev/pci/pci_host_generic_fdt.h +++ b/sys/dev/pci/pci_host_generic_fdt.h @@ -34,9 +34,13 @@ #ifndef __PCI_HOST_GENERIC_FDT_H_ #define __PCI_HOST_GENERIC_FDT_H_ +struct pci_ofw_devinfo; + struct generic_pcie_fdt_softc { struct generic_pcie_core_softc base; struct ofw_bus_iinfo pci_iinfo; + + STAILQ_HEAD(, pci_ofw_devinfo) pci_ofw_devlist; }; DECLARE_CLASS(generic_pcie_fdt_driver); From owner-dev-commits-src-main@freebsd.org Tue Jun 8 15:52:47 2021 Return-Path: Delivered-To: dev-commits-src-main@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 341FB63A122; Tue, 8 Jun 2021 15:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzvrv0lSJz3QMZ; Tue, 8 Jun 2021 15:52:47 +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 DFFDE3D91; Tue, 8 Jun 2021 15:52:46 +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 158FqkUM005344; Tue, 8 Jun 2021 15:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158FqkLO005343; Tue, 8 Jun 2021 15:52:46 GMT (envelope-from git) Date: Tue, 8 Jun 2021 15:52:46 GMT Message-Id: <202106081552.158FqkLO005343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 28c4e511c23f - main - Add ofw interface support to PCI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28c4e511c23f8b7fd131a13cc2a027aefcb520b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 15:52:47 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=28c4e511c23f8b7fd131a13cc2a027aefcb520b7 commit 28c4e511c23f8b7fd131a13cc2a027aefcb520b7 Author: Marcin Wojtas AuthorDate: 2021-05-27 08:09:04 +0000 Commit: Marcin Wojtas CommitDate: 2021-06-08 15:52:02 +0000 Add ofw interface support to PCI Some arm64 SoCs have nodes in their fdts that describe devices connected to the internal PCI bus. One such SoC is Freescale LS1028A. In order to access information stored in them we need to add ofw bus support to pci. Pass devinfo request up to our parent, which is responsible for parsing all the information. It allows to use ofw interface on PCI devices that support it. This method is similar to sys/dev/acpica/acpi_pci.c. Submitted by: Kornel Duleba Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30181 --- sys/conf/files.arm64 | 1 + sys/dev/ofw/ofw_pci.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index fed33562b834..7b9b2583aaa1 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -245,6 +245,7 @@ dev/neta/if_mvneta_fdt.c optional neta fdt dev/neta/if_mvneta.c optional neta mdio mii dev/ofw/ofw_cpu.c optional fdt +dev/ofw/ofw_pci.c optional fdt pci dev/ofw/ofw_pcib.c optional fdt pci dev/pci/controller/pci_n1sdp.c optional pci_n1sdp acpi diff --git a/sys/dev/ofw/ofw_pci.c b/sys/dev/ofw/ofw_pci.c new file mode 100644 index 000000000000..c7ed7c5c8fe9 --- /dev/null +++ b/sys/dev/ofw/ofw_pci.c @@ -0,0 +1,93 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Alstom Group. + * Copyright (c) 2021 Semihalf. + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "pcib_if.h" +#include "pci_if.h" + +static int ofw_pci_probe(device_t); +static const struct ofw_bus_devinfo* pci_ofw_get_devinfo(device_t, device_t); + +static device_method_t ofw_pci_methods[] = { + DEVMETHOD(device_probe, ofw_pci_probe), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_devinfo, pci_ofw_get_devinfo), + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), + + DEVMETHOD_END +}; + +static devclass_t pci_devclass; + +DEFINE_CLASS_1(pci, ofw_pci_driver, ofw_pci_methods, sizeof(struct pci_softc), + pci_driver); +DRIVER_MODULE(ofw_pci, pcib, ofw_pci_driver, pci_devclass, 0, 0); +MODULE_DEPEND(ofw_pci, simplebus, 1, 1, 1); +MODULE_DEPEND(ofw_pci, pci, 1, 1, 1); +MODULE_VERSION(ofw_pci, 1); + +static int +ofw_pci_probe(device_t dev) +{ + device_t parent; + + parent = device_get_parent(dev); + if (ofw_bus_get_node(parent) <= 0) + return (ENXIO); + + device_set_desc(dev, "OFW PCI bus"); + return (BUS_PROBE_DEFAULT); +} + +/* Pass the request up to our parent. */ +static const struct ofw_bus_devinfo* +pci_ofw_get_devinfo(device_t bus, device_t dev) +{ + + return OFW_BUS_GET_DEVINFO(device_get_parent(bus), dev); +} From owner-dev-commits-src-main@freebsd.org Tue Jun 8 16:37:50 2021 Return-Path: Delivered-To: dev-commits-src-main@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 9097D63AC1B; Tue, 8 Jun 2021 16:37:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzwrt3pZHz3nCt; Tue, 8 Jun 2021 16:37:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:64aa:ae5e:5615:3d60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 3E1FD9F5D; Tue, 8 Jun 2021 16:37:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 28c4e511c23f - main - Add ofw interface support to PCI To: Marcin Wojtas , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106081552.158FqkLO005343@gitrepo.freebsd.org> From: Nathan Whitehorn Message-ID: <0d50b80a-dbbc-9db9-0a31-1baaedc9978e@freebsd.org> Date: Tue, 8 Jun 2021 12:37:49 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <202106081552.158FqkLO005343@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 16:37:50 -0000 Did you look at moving sys/powerpc/ofw/ofw_pcibus.c to MI code? It does a bit more than this (NUMA etc.) and isn't actually PowerPC-specific. -Nathan On 6/8/21 11:52 AM, Marcin Wojtas wrote: > The branch main has been updated by mw: > > URL: https://cgit.FreeBSD.org/src/commit/?id=28c4e511c23f8b7fd131a13cc2a027aefcb520b7 > > commit 28c4e511c23f8b7fd131a13cc2a027aefcb520b7 > Author: Marcin Wojtas > AuthorDate: 2021-05-27 08:09:04 +0000 > Commit: Marcin Wojtas > CommitDate: 2021-06-08 15:52:02 +0000 > > Add ofw interface support to PCI > > Some arm64 SoCs have nodes in their fdts that describe devices > connected to the internal PCI bus. One such SoC is Freescale LS1028A. > In order to access information stored in them we need to add ofw bus > support to pci. Pass devinfo request up to our parent, which > is responsible for parsing all the information. > It allows to use ofw interface on PCI devices that support it. > This method is similar to sys/dev/acpica/acpi_pci.c. > > Submitted by: Kornel Duleba > Reviewed by: andrew > Obtained from: Semihalf > Sponsored by: Alstom Group > Differential Revision: https://reviews.freebsd.org/D30181 > --- > sys/conf/files.arm64 | 1 + > sys/dev/ofw/ofw_pci.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 94 insertions(+) > > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index fed33562b834..7b9b2583aaa1 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -245,6 +245,7 @@ dev/neta/if_mvneta_fdt.c optional neta fdt > dev/neta/if_mvneta.c optional neta mdio mii > > dev/ofw/ofw_cpu.c optional fdt > +dev/ofw/ofw_pci.c optional fdt pci > dev/ofw/ofw_pcib.c optional fdt pci > > dev/pci/controller/pci_n1sdp.c optional pci_n1sdp acpi > diff --git a/sys/dev/ofw/ofw_pci.c b/sys/dev/ofw/ofw_pci.c > new file mode 100644 > index 000000000000..c7ed7c5c8fe9 > --- /dev/null > +++ b/sys/dev/ofw/ofw_pci.c > @@ -0,0 +1,93 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2021 Alstom Group. > + * Copyright (c) 2021 Semihalf. > + * > + * 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 ``AS IS'' AND ANY EXPRESS OR > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. > + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include "pcib_if.h" > +#include "pci_if.h" > + > +static int ofw_pci_probe(device_t); > +static const struct ofw_bus_devinfo* pci_ofw_get_devinfo(device_t, device_t); > + > +static device_method_t ofw_pci_methods[] = { > + DEVMETHOD(device_probe, ofw_pci_probe), > + > + /* ofw_bus interface */ > + DEVMETHOD(ofw_bus_get_devinfo, pci_ofw_get_devinfo), > + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), > + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), > + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), > + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), > + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), > + > + DEVMETHOD_END > +}; > + > +static devclass_t pci_devclass; > + > +DEFINE_CLASS_1(pci, ofw_pci_driver, ofw_pci_methods, sizeof(struct pci_softc), > + pci_driver); > +DRIVER_MODULE(ofw_pci, pcib, ofw_pci_driver, pci_devclass, 0, 0); > +MODULE_DEPEND(ofw_pci, simplebus, 1, 1, 1); > +MODULE_DEPEND(ofw_pci, pci, 1, 1, 1); > +MODULE_VERSION(ofw_pci, 1); > + > +static int > +ofw_pci_probe(device_t dev) > +{ > + device_t parent; > + > + parent = device_get_parent(dev); > + if (ofw_bus_get_node(parent) <= 0) > + return (ENXIO); > + > + device_set_desc(dev, "OFW PCI bus"); > + return (BUS_PROBE_DEFAULT); > +} > + > +/* Pass the request up to our parent. */ > +static const struct ofw_bus_devinfo* > +pci_ofw_get_devinfo(device_t bus, device_t dev) > +{ > + > + return OFW_BUS_GET_DEVINFO(device_get_parent(bus), dev); > +} > From owner-dev-commits-src-main@freebsd.org Tue Jun 8 16:52:07 2021 Return-Path: Delivered-To: dev-commits-src-main@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 91F4363B180 for ; Tue, 8 Jun 2021 16:52:07 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 4Fzx9M22ypz3p95 for ; Tue, 8 Jun 2021 16:52:07 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-qk1-x734.google.com with SMTP id j184so20832581qkd.6 for ; Tue, 08 Jun 2021 09:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dNHm3eIrsRNYTeTWg6JppI0OqF49f/oq2wgx43+cEGE=; b=oWKPpB106NhxfN5xcX/t0kEfuDdtU27xiU8WpNR3ZNogQyPfcfxpGOlklUnWMRNRDv jSU9z+jXIOKVfpFJdQgMRGQUc3pjYMcJ4ekqMTkMOaWJFsWKr52cUOFCTThYkNyACKdH NMo5dWcwe9aCj2hCJ2RFOfOVJ1/RRQDohIPyBS6AnAaoNSmiDv7HfP/bdXu8AkciSaR2 NuYumWYpblx879odFI9CdORseGf+1BNuTzL7TejymlKe4M7WC1gLxqKooMlB38zy8BXJ 1/4cz+CNjr5eBWAYfSUs82E501sF9sP8ERGNVNL7YYz0FUOeBxrjF3g8UHO+IIQWS3Ip 2hpA== 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:content-transfer-encoding; bh=dNHm3eIrsRNYTeTWg6JppI0OqF49f/oq2wgx43+cEGE=; b=CGlpVgNWSaIAQgsmPY21KVkBlYPbN4hxUg5OD4OIh4tA8PoUg6TZ8/oHHWKmZ3SlEv 0uQX5gOAHNK312s+MfDxJcHd4vEgkE5rIxEkJOwLKYZ6gLzx68vONwj51MJ0cluH2mBB ck1C9VjuiMNF1TM7DUN99HfO5piwAGRyp+13WLgdmLqa5QkR4S9Wz9/7h9DfmdmbQ2FV QakbEmKlhk0IIQP3mJrQzFBCG+ILgp8/ENfzJ2sj8xDDO9C1WI+gb7kFIAhyZRjHRJgo KzIAFjhI++9HxpNk4kllznfXonl+JexNHqE9RtzINOsfXG3C+tix4KYtjgpeJ+nPgvVJ 4wvw== X-Gm-Message-State: AOAM532kEY5nsUky78DxDN2DLlKBq6HPVYVtNsNOWKKxq0J6WB2ERdFZ aj1aWG91vs0KMXYiaSgD1Oxccdn+gLkiBsaDFw96fg== X-Google-Smtp-Source: ABdhPJwSSbuUfdeCRxu1II0cOblB4MjnVruva6QPGreEVDpN9HP7xA5JNxeh/XgFOOv55EK0pR46/RhEemtvpk3aufs= X-Received: by 2002:a05:620a:1267:: with SMTP id b7mr7724621qkl.385.1623171126168; Tue, 08 Jun 2021 09:52:06 -0700 (PDT) MIME-Version: 1.0 References: <202106081552.158FqkLO005343@gitrepo.freebsd.org> <0d50b80a-dbbc-9db9-0a31-1baaedc9978e@freebsd.org> In-Reply-To: <0d50b80a-dbbc-9db9-0a31-1baaedc9978e@freebsd.org> From: Marcin Wojtas Date: Tue, 8 Jun 2021 18:51:54 +0200 Message-ID: Subject: Re: git: 28c4e511c23f - main - Add ofw interface support to PCI To: Nathan Whitehorn Cc: Marcin Wojtas , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, =?UTF-8?Q?Kornel_Dul=C4=99ba?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Fzx9M22ypz3p95 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 16:52:07 -0000 Hi Nathan, wt., 8 cze 2021 o 18:37 Nathan Whitehorn napisa=C5= =82(a): > > Did you look at moving sys/powerpc/ofw/ofw_pcibus.c to MI code? It does > a bit more than this (NUMA etc.) and isn't actually PowerPC-specific. > -Nathan > Thanks for the pointer - we will take a look. Best regards, Marcin > On 6/8/21 11:52 AM, Marcin Wojtas wrote: > > The branch main has been updated by mw: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D28c4e511c23f8b7fd131a13c= c2a027aefcb520b7 > > > > commit 28c4e511c23f8b7fd131a13cc2a027aefcb520b7 > > Author: Marcin Wojtas > > AuthorDate: 2021-05-27 08:09:04 +0000 > > Commit: Marcin Wojtas > > CommitDate: 2021-06-08 15:52:02 +0000 > > > > Add ofw interface support to PCI > > > > Some arm64 SoCs have nodes in their fdts that describe devices > > connected to the internal PCI bus. One such SoC is Freescale LS102= 8A. > > In order to access information stored in them we need to add ofw b= us > > support to pci. Pass devinfo request up to our parent, which > > is responsible for parsing all the information. > > It allows to use ofw interface on PCI devices that support it. > > This method is similar to sys/dev/acpica/acpi_pci.c. > > > > Submitted by: Kornel Duleba > > Reviewed by: andrew > > Obtained from: Semihalf > > Sponsored by: Alstom Group > > Differential Revision: https://reviews.freebsd.org/D30181 > > --- > > sys/conf/files.arm64 | 1 + > > sys/dev/ofw/ofw_pci.c | 93 ++++++++++++++++++++++++++++++++++++++++++= +++++++++ > > 2 files changed, 94 insertions(+) > > > > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > > index fed33562b834..7b9b2583aaa1 100644 > > --- a/sys/conf/files.arm64 > > +++ b/sys/conf/files.arm64 > > @@ -245,6 +245,7 @@ dev/neta/if_mvneta_fdt.c optional = neta fdt > > dev/neta/if_mvneta.c optional neta mdi= o mii > > > > dev/ofw/ofw_cpu.c optional fdt > > +dev/ofw/ofw_pci.c optional fdt pci > > dev/ofw/ofw_pcib.c optional fdt pci > > > > dev/pci/controller/pci_n1sdp.c optional pci_n1sd= p acpi > > diff --git a/sys/dev/ofw/ofw_pci.c b/sys/dev/ofw/ofw_pci.c > > new file mode 100644 > > index 000000000000..c7ed7c5c8fe9 > > --- /dev/null > > +++ b/sys/dev/ofw/ofw_pci.c > > @@ -0,0 +1,93 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2021 Alstom Group. > > + * Copyright (c) 2021 Semihalf. > > + * > > + * 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 copyrigh= t > > + * notice, this list of conditions and the following disclaimer in = the > > + * documentation and/or other materials provided with the distribut= ion. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS O= R > > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARR= ANTIES > > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAI= MED. > > + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, > > + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING= , BUT > > + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS O= F USE, > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON A= NY > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U= SE OF > > + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > + */ > > + > > +#include > > +__FBSDID("$FreeBSD$"); > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include "pcib_if.h" > > +#include "pci_if.h" > > + > > +static int ofw_pci_probe(device_t); > > +static const struct ofw_bus_devinfo* pci_ofw_get_devinfo(device_t, dev= ice_t); > > + > > +static device_method_t ofw_pci_methods[] =3D { > > + DEVMETHOD(device_probe, ofw_pci_probe), > > + > > + /* ofw_bus interface */ > > + DEVMETHOD(ofw_bus_get_devinfo, pci_ofw_get_devinfo), > > + DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), > > + DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), > > + DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), > > + DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), > > + DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), > > + > > + DEVMETHOD_END > > +}; > > + > > +static devclass_t pci_devclass; > > + > > +DEFINE_CLASS_1(pci, ofw_pci_driver, ofw_pci_methods, sizeof(struct pci= _softc), > > + pci_driver); > > +DRIVER_MODULE(ofw_pci, pcib, ofw_pci_driver, pci_devclass, 0, 0); > > +MODULE_DEPEND(ofw_pci, simplebus, 1, 1, 1); > > +MODULE_DEPEND(ofw_pci, pci, 1, 1, 1); > > +MODULE_VERSION(ofw_pci, 1); > > + > > +static int > > +ofw_pci_probe(device_t dev) > > +{ > > + device_t parent; > > + > > + parent =3D device_get_parent(dev); > > + if (ofw_bus_get_node(parent) <=3D 0) > > + return (ENXIO); > > + > > + device_set_desc(dev, "OFW PCI bus"); > > + return (BUS_PROBE_DEFAULT); > > +} > > + > > +/* Pass the request up to our parent. */ > > +static const struct ofw_bus_devinfo* > > +pci_ofw_get_devinfo(device_t bus, device_t dev) > > +{ > > + > > + return OFW_BUS_GET_DEVINFO(device_get_parent(bus), dev); > > +} > > > From owner-dev-commits-src-main@freebsd.org Tue Jun 8 17:05:59 2021 Return-Path: Delivered-To: dev-commits-src-main@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 55CD463AFBB for ; Tue, 8 Jun 2021 17:05:59 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 4FzxTM1fpQz3qP2 for ; Tue, 8 Jun 2021 17:05:59 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk1-x733.google.com with SMTP id i68so17298311qke.3 for ; Tue, 08 Jun 2021 10:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dD/Dkl1l31G6Ggfg6fRq8btR47ppYP1NBdRhno70+yw=; b=GqDgLMCCfmKRKuCa2tEhlO1Uyo4kS8nyFM4XRDiYeiTvc02TrJBaprRrut+7emqsDq X+b7ot4+U/Q1gOABg4wBQCFA9dAKppLkNc0xEfBUH4b6qMV6iNywR5azID2q4npHe/Sz naizjVRbcquqGMneMdYgyZOU4nBT/EwcZFdDGwigGTmWGE3BDqBDiSfWTNMNDdBn7ls6 U2/nLKvWdYXauDjjSVwf16WvF+08qQUC0OtBYdjBJlnr4uGJtvP4AA+QL7Uxi8OiNBRg JQ7gTxK+6o9TiuGEBOxXObYO5N/tBscjMEvw1D7lNt74b6rXpMvmk2Ae2IZIncf3pBwF X/JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dD/Dkl1l31G6Ggfg6fRq8btR47ppYP1NBdRhno70+yw=; b=BZiiiF0XNpqJKPhS86hXU6RfMWmKTsm1CK70lxQkjDDleklgzgdj/cdsXU4heaLMpV KsrwJVUhzYq5xnj+ArznSsASh5kjOuA3zuZ0jIpsMI+yxsnvyOh9T+x7O40cFLIM5lNX yJrgJd575NpaasiQqsoWeWZCV3ozAw+wt2j8vsF8ilEQLDUKKjPhVSG1l5GY4Adlaa2v WPqRd7J+Bne8oAycOu8/aKVEgpdnGwSJdRTAT7o/hk2H0fV03/8f6Shj4wH3l5g69B0O 2pHdVJtDtNAp7jr+MXjZBxi1M80Hq/tlJuXRDvZDB7Nty/R7tsE8N6dNaSslpvWBqZcc q+PQ== X-Gm-Message-State: AOAM533NSl1tqrB2Wezv/myWz8YfD+354Fq23oRnHxkdMIbKzerAlydv oDABThRy374QxN+xPzr7R/3hLQ== X-Google-Smtp-Source: ABdhPJyXxO+tCrYE0wALLXaS62byqvyGnvEd/4QZ8UxKkv+fQyGpTfwFnkyy4zVlnMZqJg0m/VvkdA== X-Received: by 2002:ae9:e84b:: with SMTP id a72mr19570839qkg.226.1623171955752; Tue, 08 Jun 2021 10:05:55 -0700 (PDT) Received: from mutt-hbsd ([38.140.209.220]) by smtp.gmail.com with ESMTPSA id p7sm1437599qkk.104.2021.06.08.10.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 10:05:54 -0700 (PDT) Date: Tue, 8 Jun 2021 13:05:54 -0400 From: Shawn Webb To: Martin Matuska Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main Message-ID: <20210608170554.7ge67t5aiwry54lt@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202106081453.158Eri7k025234@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hrzeujzawo3dwmmv" Content-Disposition: inline In-Reply-To: <202106081453.158Eri7k025234@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4FzxTM1fpQz3qP2 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 17:05:59 -0000 --hrzeujzawo3dwmmv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Martin, On Tue, Jun 08, 2021 at 02:53:44PM +0000, Martin Matuska wrote: > The branch main has been updated by mm: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D1603881667360c015f6685131f= 2f25474fa67a72 >=20 > commit 1603881667360c015f6685131f2f25474fa67a72 > Merge: ed9215c8e05f 75b4cbf62590 > Author: Martin Matuska > AuthorDate: 2021-06-08 14:48:37 +0000 > Commit: Martin Matuska > CommitDate: 2021-06-08 14:52:44 +0000 This commit broke buildworld (at least on HardenedBSD). Log of the build posted below. building shared library libavl.so.2 cc -target x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.am= d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -flto -fstack-protect= or-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel -o= libavl.so.2.full -Wl,-soname,libavl.so.2 avl.pico=20 objcopy --only-keep-debug libavl.so.2.full libavl.so.2.debug objcopy --strip-debug --add-gnu-debuglink=3Dlibavl.so.2.debug libavl.so.2.= full libavl.so.2 install -U -C -o root -g wheel -m 444 libavl.a /usr/obj/usr/src/amd64.am= d64/tmp/usr/lib/ install -U -s -o root -g wheel -m 444 -S libavl.so.2 /usr/obj/usr/src/a= md64.amd64/tmp/lib/ install -U -o root -g wheel -m 444 libavl.so.2.debug /usr/obj/usr/src/a= md64.amd64/tmp/usr/lib/debug/lib/ install -U -l rs -o root -g wheel -m 755 -S /usr/obj/usr/src/amd64.amd64/= tmp/lib/libavl.so.2 /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libavl.so =3D=3D=3D> cddl/lib/libspl (obj,all,install) make[4]: don't know how to make atomic.S. Stop make[4]: stopped in /usr/src/cddl/lib/libspl Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --hrzeujzawo3dwmmv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmC/o3AACgkQ/y5nonf4 4fpewQ/+MxlqQyjud7NWtPHt2WzrP0lNegE6IvMZYqXNfAafN6lfhEEmIhiGUb9H m49E09SzhXiy8puBm6ErscmFMn7zPcRNurQlQAaoi1XE5F8P4UiA9d2jLWUNWnmL KuFIZaAq0hH7mO+sNIJBKgljQvVAJYKBw0ZEWBhlNyWhKN+tAiflZn8nDnJwREOC drivm2XEN/Lt7sYR5wUf2WkJkaBtbTbRUFSPuIhXV6p1V9oqd5ERnOL9qrjA57sc fArfpFDMTiy6nzUqG7Mx/50iFa62an4vK+J232U1qkUgb814llAMjDjSf7nKNKxu pfxohraZt2/zx252Qi20LBbmCjFucAn7lsanSj9GQC2Vquc7PG+eT+vk0TGIfLPP EtUoyK9M7rfqWc1T+UY8fzVn8YnkaWo6lIdOFaUn3sSBaEVbeIXtpkGF2q1nHdAD 2XR1zbSiZ8kM5R+tjoH3KWtJHzzhEAHJlUZquk6BZWz8MuztFyZdImM5a5slwfiB x1+qYRwAZA2mhEeaTNWZySOEmzuLcUbJrI1j4jGB58DU8pPSDX5ZFY7JlkdPuc36 5FoWDNLnmHMtjW2NZjW7e2hTnXQ3hAUTbsHK05g6kyY9aX1UZngqbrCd0m5UOByD RMYzVTYRIk8+pwYx0HKYEv/PsSY1giVlOf9qdFeWkZw05qZy3HM= =0Xrn -----END PGP SIGNATURE----- --hrzeujzawo3dwmmv-- From owner-dev-commits-src-main@freebsd.org Tue Jun 8 17:25:03 2021 Return-Path: Delivered-To: dev-commits-src-main@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 CC13A63B808; Tue, 8 Jun 2021 17:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzxvM5Sf1z3sjD; Tue, 8 Jun 2021 17:25: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 9EBBA4ED9; Tue, 8 Jun 2021 17:25: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 158HP3rF025820; Tue, 8 Jun 2021 17:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158HP33p025819; Tue, 8 Jun 2021 17:25:03 GMT (envelope-from git) Date: Tue, 8 Jun 2021 17:25:03 GMT Message-Id: <202106081725.158HP33p025819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 9021c46603bf - main - tests/netgraph: Attribute errors to the caller MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9021c46603bf29b9700f24b8dce8796b434d7c8f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 17:25:03 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=9021c46603bf29b9700f24b8dce8796b434d7c8f commit 9021c46603bf29b9700f24b8dce8796b434d7c8f Author: Lutz Donnerhacke AuthorDate: 2021-06-08 17:19:35 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-08 17:23:50 +0000 tests/netgraph: Attribute errors to the caller Errors raised in the common util functions should raise the location of their caller to be useful and include the errno description. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30671 --- tests/sys/netgraph/util.c | 43 +++++++++++++++++++++++++----------------- tests/sys/netgraph/util.h | 48 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 64 insertions(+), 27 deletions(-) diff --git a/tests/sys/netgraph/util.c b/tests/sys/netgraph/util.c index 450a176971a7..dbf62599aa04 100644 --- a/tests/sys/netgraph/util.c +++ b/tests/sys/netgraph/util.c @@ -45,11 +45,13 @@ static int cs = -1, ds = -1; static ng_error_t error_handling = FAIL; -#define CHECK(r, x) do { \ - if (error_handling == FAIL) \ - ATF_REQUIRE(x); \ - else if(!(x)) \ - return r; \ +#define CHECK(r, x) do { \ + if (!(x)) { \ + if (error_handling == PASS) \ + return r; \ + atf_tc_fail_requirement(file, line, "%s (%s)", \ + #x " not met", strerror(errno));\ + } \ } while(0) struct data_handler { @@ -64,8 +66,9 @@ static void handle_data(void *ctx); static void handle_msg(void *ctx); void -ng_connect(char const *path1, char const *hook1, - char const *path2, char const *hook2) +_ng_connect(char const *path1, char const *hook1, + char const *path2, char const *hook2, + char const *file, size_t line) { struct ngm_connect c; @@ -79,8 +82,9 @@ ng_connect(char const *path1, char const *hook1, } void -ng_mkpeer(char const *path1, char const *hook1, - char const *type, char const *hook2) +_ng_mkpeer(char const *path1, char const *hook1, + char const *type, char const *hook2, + char const *file, size_t line) { struct ngm_mkpeer p; @@ -94,7 +98,8 @@ ng_mkpeer(char const *path1, char const *hook1, } void -ng_rmhook(char const *path, char const *hook) +_ng_rmhook(char const *path, char const *hook, + char const *file, size_t line) { struct ngm_rmhook h; @@ -106,7 +111,8 @@ ng_rmhook(char const *path, char const *hook) } void -ng_name(char const *path, char const *name) +_ng_name(char const *path, char const *name, + char const *file, size_t line) { struct ngm_name n; @@ -118,7 +124,8 @@ ng_name(char const *path, char const *name) } void -ng_shutdown(char const *path) +_ng_shutdown(char const *path, + char const *file, size_t line) { CHECK(, -1 != NgSendMsg(cs, path, NGM_GENERIC_COOKIE, NGM_SHUTDOWN, @@ -137,8 +144,9 @@ ng_register_data(char const *hook, ng_data_handler_t proc) } void -ng_send_data(char const *hook, - void const *data, size_t len) +_ng_send_data(char const *hook, + void const *data, size_t len, + char const *file, size_t line) { CHECK(, -1 != NgSendData(ds, hook, data, len)); } @@ -213,7 +221,8 @@ ng_handle_events(unsigned int ms, void *context) } int -ng_send_msg(char const *path, char const *msg) +_ng_send_msg(char const *path, char const *msg, + char const *file, size_t line) { int res; @@ -231,10 +240,10 @@ ng_errors(ng_error_t n) } void -ng_init(void) { +_ng_init(char const *file, size_t line) { if (cs >= 0) /* prevent reinit */ return; - ATF_REQUIRE(0 == NgMkSockNode(NULL, &cs, &ds)); + CHECK(, 0 == NgMkSockNode(NULL, &cs, &ds)); NgSetDebug(3); } diff --git a/tests/sys/netgraph/util.h b/tests/sys/netgraph/util.h index 93ddc91f79bc..41243e15fb10 100644 --- a/tests/sys/netgraph/util.h +++ b/tests/sys/netgraph/util.h @@ -34,21 +34,47 @@ #include -void ng_connect (char const *path1, char const *hook1, - char const *path2, char const *hook2); -void ng_mkpeer (char const *path1, char const *hook1, - char const *type, char const *hook2); -void ng_shutdown(char const *path); -void ng_rmhook (char const *path, char const *hook); -void ng_name (char const *path, char const *name); +void _ng_connect (char const *path1, char const *hook1, + char const *path2, char const *hook2, + char const *file, size_t line); +#define ng_connect(p1,h1,p2,h2) \ + _ng_connect(p1,h1,p2,h2,__FILE__,__LINE__) + +void _ng_mkpeer (char const *path1, char const *hook1, + char const *type, char const *hook2, + char const *file, size_t line); +#define ng_mkpeer(p1,h1,t,h2) \ + _ng_mkpeer(p1,h1,t,h2,__FILE__,__LINE__) + +void _ng_shutdown(char const *path, + char const *file, size_t line); +#define ng_shutdown(p) \ + _ng_shutdown(p,__FILE__,__LINE__) + +void _ng_rmhook (char const *path, char const *hook, + char const *file, size_t line); +#define ng_rmhook(p,h) \ + _ng_rmhook(p,h,__FILE__,__LINE__) + +void _ng_name (char const *path, char const *name, + char const *file, size_t line); +#define ng_name(p,n) \ + _ng_name(p,n,__FILE__,__LINE__) + typedef void (*ng_data_handler_t)(void *, size_t, void *ctx); void ng_register_data(char const *hook, ng_data_handler_t proc); -void ng_send_data(char const *hook, void const *, size_t); +void _ng_send_data(char const *hook, void const *, size_t, + char const *file, size_t line); +#define ng_send_data(h,d,l) \ + _ng_send_data(h,d,l,__FILE__,__LINE__) typedef void (*ng_msg_handler_t)(char const *, struct ng_mesg *, void *); void ng_register_msg(ng_msg_handler_t proc); -int ng_send_msg(char const *path, char const *msg); +int _ng_send_msg(char const *path, char const *msg, + char const *file, size_t line); +#define ng_send_msg(p,m) \ + _ng_send_msg(p,m,__FILE__,__LINE__) int ng_handle_event (unsigned int ms, void *ctx); void ng_handle_events(unsigned int ms, void *ctx); @@ -56,4 +82,6 @@ void ng_handle_events(unsigned int ms, void *ctx); typedef enum { FAIL, PASS } ng_error_t; ng_error_t ng_errors(ng_error_t); -void ng_init(void); +void _ng_init(char const *file, size_t line); +#define ng_init() \ + _ng_init(__FILE__,__LINE__) From owner-dev-commits-src-main@freebsd.org Tue Jun 8 17:31:25 2021 Return-Path: Delivered-To: dev-commits-src-main@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 20A3D63BA82; Tue, 8 Jun 2021 17:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzy2j0TK9z3tFY; Tue, 8 Jun 2021 17:31: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 EDA4A4E78; Tue, 8 Jun 2021 17:31: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 158HVOMS035999; Tue, 8 Jun 2021 17:31:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158HVO7d035986; Tue, 8 Jun 2021 17:31:24 GMT (envelope-from git) Date: Tue, 8 Jun 2021 17:31:24 GMT Message-Id: <202106081731.158HVO7d035986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: de295884c4ef - main - tip: Cast via intptr_t not long when casting between pointer and int MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de295884c4efd9a126dfdd8d98247de345d1f468 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 17:31:25 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=de295884c4efd9a126dfdd8d98247de345d1f468 commit de295884c4efd9a126dfdd8d98247de345d1f468 Author: Jessica Clarke AuthorDate: 2021-06-08 17:30:59 +0000 Commit: Jessica Clarke CommitDate: 2021-06-08 17:30:59 +0000 tip: Cast via intptr_t not long when casting between pointer and int Whilst all FreeBSD architectures have the same representation for intptr_t and long (even if the former is int on ILP32 architectures), this is more general and correct, and on CHERI they are not the same so warnings are generated by default for integer-to-pointer casts that aren't via (u)intptr_t. Reviewed by: imp, kib Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D30696 --- usr.bin/tip/tip/tip.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index ab6b2c4cd9a0..6bf94521cdfd 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -153,16 +153,16 @@ typedef */ #define value(v) vtable[v].v_value -#define lvalue(v) (long)vtable[v].v_value +#define lvalue(v) (long)(intptr_t)vtable[v].v_value -#define number(v) ((long)(v)) -#define boolean(v) ((short)(long)(v)) -#define character(v) ((char)(long)(v)) -#define address(v) ((long *)(v)) +#define number(v) ((long)(intptr_t)(v)) +#define boolean(v) ((short)(intptr_t)(v)) +#define character(v) ((char)(intptr_t)(v)) +#define address(v) ((long *)(v)) -#define setnumber(v,n) do { (v) = (char *)(long)(n); } while (0) -#define setboolean(v,n) do { (v) = (char *)(long)(n); } while (0) -#define setcharacter(v,n) do { (v) = (char *)(long)(n); } while (0) +#define setnumber(v,n) do { (v) = (char *)(intptr_t)(n); } while (0) +#define setboolean(v,n) do { (v) = (char *)(intptr_t)(n); } while (0) +#define setcharacter(v,n) do { (v) = (char *)(intptr_t)(n); } while (0) #define setaddress(v,n) do { (v) = (char *)(n); } while (0) /* From owner-dev-commits-src-main@freebsd.org Tue Jun 8 17:31:26 2021 Return-Path: Delivered-To: dev-commits-src-main@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 6BF5463B899; Tue, 8 Jun 2021 17:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzy2k2Kgwz3t7j; Tue, 8 Jun 2021 17:31:26 +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 2595C5480; Tue, 8 Jun 2021 17:31:26 +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 158HVQ42037299; Tue, 8 Jun 2021 17:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158HVQx5037285; Tue, 8 Jun 2021 17:31:26 GMT (envelope-from git) Date: Tue, 8 Jun 2021 17:31:26 GMT Message-Id: <202106081731.158HVQx5037285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 6d2648bcaba9 - main - tip: Fix pointer-vs-integer confusion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d2648bcaba9b14e2f5c76680f3e7608e1f125f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 17:31:26 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=6d2648bcaba9b14e2f5c76680f3e7608e1f125f4 commit 6d2648bcaba9b14e2f5c76680f3e7608e1f125f4 Author: Jessica Clarke AuthorDate: 2021-06-08 17:30:59 +0000 Commit: Jessica Clarke CommitDate: 2021-06-08 17:30:59 +0000 tip: Fix pointer-vs-integer confusion Currently IREMOTE assumes that every value is (initially) a pointer to a long. This is true for NUMBERs, but false for STRINGs, which are instead pointers to pointers, though on ILP32 and LP64 systems these happen to have the same representation, but this is still a strict aliasing violation, and of course breaks on systems where the representations are not the same, such as CHERI. We do not currently have any BOOLs (short, curiously) or CHARs used with IREMOTE, though the code should not be relying on that. This removes the unused setaddress macro, and the now-unused address macro due to the above issue. Reviewed by: imp, kib Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D30697 --- usr.bin/tip/tip/tip.h | 2 -- usr.bin/tip/tip/value.c | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index 6bf94521cdfd..298b08cb6692 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -158,12 +158,10 @@ typedef #define number(v) ((long)(intptr_t)(v)) #define boolean(v) ((short)(intptr_t)(v)) #define character(v) ((char)(intptr_t)(v)) -#define address(v) ((long *)(v)) #define setnumber(v,n) do { (v) = (char *)(intptr_t)(n); } while (0) #define setboolean(v,n) do { (v) = (char *)(intptr_t)(n); } while (0) #define setcharacter(v,n) do { (v) = (char *)(intptr_t)(n); } while (0) -#define setaddress(v,n) do { (v) = (char *)(n); } while (0) /* * Escape command table definitions -- diff --git a/usr.bin/tip/tip/value.c b/usr.bin/tip/tip/value.c index a4776b80d35d..9cf1052d3ea2 100644 --- a/usr.bin/tip/tip/value.c +++ b/usr.bin/tip/tip/value.c @@ -69,8 +69,22 @@ vinit(void) if (p->v_type&ENVIRON) if ((cp = getenv(p->v_name))) p->v_value = cp; - if (p->v_type&IREMOTE) - setnumber(p->v_value, *address(p->v_value)); + if (p->v_type&IREMOTE) { + switch (p->v_type&TMASK) { + case STRING: + p->v_value = *(char **)p->v_value; + break; + case NUMBER: + setnumber(p->v_value, *(long *)p->v_value); + break; + case BOOL: + setboolean(p->v_value, *(short *)p->v_value); + break; + case CHAR: + setcharacter(p->v_value, *(char *)p->v_value); + break; + } + } } /* * Read the .tiprc file in the HOME directory From owner-dev-commits-src-main@freebsd.org Tue Jun 8 17:33:22 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D3C9663BA4B; Tue, 8 Jun 2021 17:33:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzy4y3Bxsz3tJp; Tue, 8 Jun 2021 17:33:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.66.148.124]) by shaw.ca with ESMTPA id qfbKlBmF2ycp5qfbMl7ARq; Tue, 08 Jun 2021 11:33:20 -0600 X-Authority-Analysis: v=2.4 cv=H864f8Ui c=1 sm=1 tr=0 ts=60bfa9e0 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=r6YtysWOX24A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=FiNJkoHMrfPae4rBkvEA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id BAA8B29A; Tue, 8 Jun 2021 10:33:17 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 158HX4UN005996; Tue, 8 Jun 2021 10:33:05 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202106081733.158HX4UN005996@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Shawn Webb cc: Martin Matuska , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main In-reply-to: <20210608170554.7ge67t5aiwry54lt@mutt-hbsd> References: <202106081453.158Eri7k025234@gitrepo.freebsd.org> <20210608170554.7ge67t5aiwry54lt@mutt-hbsd> Comments: In-reply-to Shawn Webb message dated "Tue, 08 Jun 2021 13:05:54 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 08 Jun 2021 10:33:04 -0700 X-CMAE-Envelope: MS4xfIQiPbMjGuxsBYJ+9ip0N8xe0spyZUalvoBq+TmuC83kZb71A+r/pg/SBox37gPw3rXRAepRqukdMxBHGBcZfCyYTbCwF5e2OuEgbISVjceJn9nusy4B xsFZz2x0Vn8MmpDfVzZ9EUTDHkL3AFqFm8V2DjKEEziLNMzGurssNg8bkEowMwUYtWGrCeVqiw7bT3lYzdy7iaqUTn2HR2VDGwND2NEBchDwKDqbxfLHTkWl nYmcbDMCDZ1KuPkRzO4T9ke9IhjU7yHAfG0CdTXkRsgoaw0tHNiw8Y1Hvc2vJtmKjV0qGppnucYvDJVsi61No0KH3JCKGfQOGJ9tXdc9nXlpi15NzBEd6DEs vUiyro7Ah3quU6Tck13rzrfFqfPPVA== X-Rspamd-Queue-Id: 4Fzy4y3Bxsz3tJp 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 17:33:22 -0000 In message <20210608170554.7ge67t5aiwry54lt@mutt-hbsd>, Shawn Webb writes: > > Hey Martin, > > On Tue, Jun 08, 2021 at 02:53:44PM +0000, Martin Matuska wrote: > > The branch main has been updated by mm: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D1603881667360c015f6685131f= > 2f25474fa67a72 > >=20 > > commit 1603881667360c015f6685131f2f25474fa67a72 > > Merge: ed9215c8e05f 75b4cbf62590 > > Author: Martin Matuska > > AuthorDate: 2021-06-08 14:48:37 +0000 > > Commit: Martin Matuska > > CommitDate: 2021-06-08 14:52:44 +0000 > > This commit broke buildworld (at least on HardenedBSD). Log of the Not just HardendBSD. > build posted below. > > building shared library libavl.so.2 > cc -target x86_64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/amd64.am= > d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -flto -fstack-protect= > or-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel -o= > libavl.so.2.full -Wl,-soname,libavl.so.2 avl.pico=20 > objcopy --only-keep-debug libavl.so.2.full libavl.so.2.debug > objcopy --strip-debug --add-gnu-debuglink=3Dlibavl.so.2.debug libavl.so.2.= > full libavl.so.2 > install -U -C -o root -g wheel -m 444 libavl.a /usr/obj/usr/src/amd64.am= > d64/tmp/usr/lib/ > install -U -s -o root -g wheel -m 444 -S libavl.so.2 /usr/obj/usr/src/a= > md64.amd64/tmp/lib/ > install -U -o root -g wheel -m 444 libavl.so.2.debug /usr/obj/usr/src/a= > md64.amd64/tmp/usr/lib/debug/lib/ > install -U -l rs -o root -g wheel -m 755 -S /usr/obj/usr/src/amd64.amd64/= > tmp/lib/libavl.so.2 /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libavl.so > =3D=3D=3D> cddl/lib/libspl (obj,all,install) > make[4]: don't know how to make atomic.S. Stop > > make[4]: stopped in /usr/src/cddl/lib/libspl > > Thanks, > > --=20 > Shawn Webb > Cofounder / Security Engineer > HardenedBSD > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Tue Jun 8 17:34:19 2021 Return-Path: Delivered-To: dev-commits-src-main@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 0042B63BCC8 for ; Tue, 8 Jun 2021 17:34:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (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 4Fzy626RSyz3tPd for ; Tue, 8 Jun 2021 17:34:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2d.google.com with SMTP id if15so398369qvb.2 for ; Tue, 08 Jun 2021 10:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xJzANi91ABOCEuejcFCBnMaceS3K+1JC5+T1mhkjTEo=; b=QnXUcmo3sikQtE+ViW8ZNyI08yZ1mgWZ69Vi28dzlJf8gfkcyBqexCoDAeSq2dWQ7v fUUi1e8GgpTsNMxfgfqlgJqi9iLUvrADDlfIc6l8OC+0IjgdTe4GiKM4Kp0wgcXP5UDl nw3cmVLiU/2vBxDWIN+ldojeocK7PR9aOeS+lwCsQ7aDGFLxTsOrqEUuLnFox/oCMZlj kev04TNplQ+641fvaVy7P95BndDsj6otQ/xyG5/h6EkIA2mwjoCHQ6nYjYnOsJw1NUBu BfuOqDTFF46HLlIJM1G4ili+quJwyMcUBcKExFoCRvxv4fR4TW2CE+5vE0l2e8hPUNi0 eyZg== 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=xJzANi91ABOCEuejcFCBnMaceS3K+1JC5+T1mhkjTEo=; b=mJmKkxQzW4GPQiwrZgJXRBWXTEjDPsR4GqiqNRh1Jz5Td1IH8o8U1pu/Pu86A2Kd/u 0M8bc8dpeLLIBe8kUJnhmc62gfyegSy9sUsdcKp4BeIidYfmgUAf92y7AmAh7n35UTQY ws2N57+n5N3YAJ7FCr4xSYuAu3Tq1OuOpX/bp729fY7nnKSvjy36ykQYNnK1HQ1qMjs5 cLLl8K4utJNE+c265cHneZgqYAkya32zSvXYerxvM71bPYQ8DBgp99dcTFAfpdGC8RGG RqmWSYzvshRY5VG7kH75lxVNEMUxYs1b8d/q9roZKxJqMVaDepyaEvWif7mffyq0uGZ9 emcA== X-Gm-Message-State: AOAM531+TF1f1xhbfDRIyL43Cfst3L3ZtXPvxcuPfDWM+rGHLnW5HPtS KZI+GeYbkgBB5RqbigLyPJ3Q7/Fpv2MG2SN7Vr6g3g== X-Google-Smtp-Source: ABdhPJxAda7Wb5LG5KaVaFbPogohlFL9AFg5CF6UKMOlYOiGJx0V6soXd+4cAZmvMn7sn9uFh3M5fzAZcGf6vfC5ZfI= X-Received: by 2002:ad4:576c:: with SMTP id r12mr970692qvx.28.1623173657791; Tue, 08 Jun 2021 10:34:17 -0700 (PDT) MIME-Version: 1.0 References: <202106081453.158Eri7k025234@gitrepo.freebsd.org> <20210608170554.7ge67t5aiwry54lt@mutt-hbsd> In-Reply-To: <20210608170554.7ge67t5aiwry54lt@mutt-hbsd> From: Warner Losh Date: Tue, 8 Jun 2021 11:34:06 -0600 Message-ID: Subject: Re: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main To: Shawn Webb Cc: Martin Matuska , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Fzy626RSyz3tPd 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 17:34:19 -0000 On Tue, Jun 8, 2021 at 11:06 AM Shawn Webb wrote: > Hey Martin, > > On Tue, Jun 08, 2021 at 02:53:44PM +0000, Martin Matuska wrote: > > The branch main has been updated by mm: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=1603881667360c015f6685131f2f25474fa67a72 > > > > commit 1603881667360c015f6685131f2f25474fa67a72 > > Merge: ed9215c8e05f 75b4cbf62590 > > Author: Martin Matuska > > AuthorDate: 2021-06-08 14:48:37 +0000 > > Commit: Martin Matuska > > CommitDate: 2021-06-08 14:52:44 +0000 > > This commit broke buildworld (at least on HardenedBSD). Log of the > build posted below. > > building shared library libavl.so.2 > cc -target x86_64-unknown-freebsd14.0 > --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -flto > -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings > -Wl,--warn-shared-textrel -o libavl.so.2.full -Wl,-soname,libavl.so.2 > avl.pico > objcopy --only-keep-debug libavl.so.2.full libavl.so.2.debug > objcopy --strip-debug --add-gnu-debuglink=libavl.so.2.debug > libavl.so.2.full libavl.so.2 > install -U -C -o root -g wheel -m 444 libavl.a > /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/ > install -U -s -o root -g wheel -m 444 -S libavl.so.2 > /usr/obj/usr/src/amd64.amd64/tmp/lib/ > install -U -o root -g wheel -m 444 libavl.so.2.debug > /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/debug/lib/ > install -U -l rs -o root -g wheel -m 755 -S > /usr/obj/usr/src/amd64.amd64/tmp/lib/libavl.so.2 > /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libavl.so > ===> cddl/lib/libspl (obj,all,install) > make[4]: don't know how to make atomic.S. Stop > > make[4]: stopped in /usr/src/cddl/lib/libspl > A fix is in progress... Warner From owner-dev-commits-src-main@freebsd.org Tue Jun 8 20:21:54 2021 Return-Path: Delivered-To: dev-commits-src-main@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 EB87A63DA6E; Tue, 8 Jun 2021 20:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G01qQ69CKz4k6j; Tue, 8 Jun 2021 20:21:54 +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 BC4D772EA; Tue, 8 Jun 2021 20:21:54 +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 158KLsPF065729; Tue, 8 Jun 2021 20:21:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158KLscZ065728; Tue, 8 Jun 2021 20:21:54 GMT (envelope-from git) Date: Tue, 8 Jun 2021 20:21:54 GMT Message-Id: <202106082021.158KLscZ065728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: f20893853e8e - main - zfs: unbreak build broken in 160388166 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f20893853e8e6909d422f6646b706b4b6e299682 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 20:21:55 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f20893853e8e6909d422f6646b706b4b6e299682 commit f20893853e8e6909d422f6646b706b4b6e299682 Author: Martin Matuska AuthorDate: 2021-06-08 17:02:21 +0000 Commit: Martin Matuska CommitDate: 2021-06-08 20:21:11 +0000 zfs: unbreak build broken in 160388166 --- cddl/lib/libspl/Makefile | 28 ++++++++-------------------- cddl/lib/libuutil/Makefile | 2 -- cddl/lib/libzfs/Makefile | 5 ++--- cddl/usr.bin/Makefile | 2 -- cddl/usr.bin/zstream/Makefile | 3 +++ cddl/usr.bin/zstreamdump/Makefile | 11 ----------- cddl/usr.bin/zstreamdump/Makefile.depend | 25 ------------------------- lib/libbe/Makefile | 1 + 8 files changed, 14 insertions(+), 63 deletions(-) diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 8088ef497d46..f565683fba4e 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -1,7 +1,6 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/include @@ -11,11 +10,13 @@ PACKAGE= runtime SRCS = \ assert.c \ + getexecname.c \ list.c \ mkdirp.c \ + os/freebsd/getexecname.c \ + os/freebsd/zone.c \ page.c \ timestamp.c \ - zone.c \ include/sys/list.h \ include/sys/list_impl.h @@ -23,25 +24,12 @@ SRCS = \ # will not compile when building on macOS. .if !defined(BOOTSTRAPPING) SRCS += \ - getexecname.c \ - gethostid.c \ - getmntany.c \ - mnttab.c - - -.if ${MACHINE_ARCH} == "amd64" -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-x86_64 -SRCS += atomic.S -.elif ${MACHINE_ARCH} == "i386" -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-i386 -SRCS += atomic.S -.else -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl/asm-generic -SRCS += atomic.c -.endif + atomic.c \ + os/freebsd/gethostid.c \ + os/freebsd/getmntany.c \ + os/freebsd/mnttab.c .endif - WARNS?= 2 CSTD= c99 CFLAGS+= -DIN_BASE @@ -53,6 +41,6 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS.atomic.S+= -DLOCORE +CFLAGS.atomic.c+= -Wno-error-atomic-alignment .include diff --git a/cddl/lib/libuutil/Makefile b/cddl/lib/libuutil/Makefile index 76567b50c610..169b8d8afe01 100644 --- a/cddl/lib/libuutil/Makefile +++ b/cddl/lib/libuutil/Makefile @@ -7,11 +7,9 @@ LIB= uutil SRCS=\ uu_alloc.c \ uu_avl.c \ - uu_dprintf.c \ uu_ident.c \ uu_list.c \ uu_misc.c \ - uu_open.c \ uu_pname.c \ uu_string.c diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index b159955c0212..6de09d1b7333 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -5,7 +5,6 @@ .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare -.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare/os/freebsd .PATH: ${SRCTOP}/sys/contrib/openzfs/include .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd .PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib @@ -53,8 +52,8 @@ USER_C += \ USER_C += \ libshare.c \ nfs.c \ - smb.c - + os/freebsd/nfs.c \ + os/freebsd/smb.c KERNEL_C = \ algs/sha2/sha2.c \ diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile index 5c2595df1c9f..10d55215c0b3 100644 --- a/cddl/usr.bin/Makefile +++ b/cddl/usr.bin/Makefile @@ -8,7 +8,6 @@ SUBDIR= \ ctfmerge \ ${_zinject} \ ${_zstream} \ - ${_zstreamdump} \ ${_ztest} SUBDIR.${MK_TESTS}+= tests @@ -17,7 +16,6 @@ SUBDIR.${MK_TESTS}+= tests _zinject= zinject _ztest= ztest _zstream = zstream -_zstreamdump = zstreamdump .endif SUBDIR_PARALLEL= diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index d6ac8c5f3b16..ac3bfeb68cf4 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -7,6 +7,7 @@ ZFSTOP= ${SRCTOP}/sys/contrib/openzfs PROG= zstream MAN= zstream.8 +MLINKS= zstream.8 zstreamdump.8 INCS= zstream.h SRCS= \ zstream.c \ @@ -14,6 +15,8 @@ SRCS= \ zstream_redup.c \ zstream_token.c +LINKS= ${BINDIR}/zstream ${BINDIR}/zstreamdump + WARNS?= 2 CFLAGS+= \ -DIN_BASE \ diff --git a/cddl/usr.bin/zstreamdump/Makefile b/cddl/usr.bin/zstreamdump/Makefile deleted file mode 100644 index 63f365d0445a..000000000000 --- a/cddl/usr.bin/zstreamdump/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -ZFSTOP= ${SRCTOP}/sys/contrib/openzfs - -.PATH: ${ZFSTOP}/cmd/zstreamdump -.PATH: ${ZFSTOP}/man/man8 - -SCRIPTS= zstreamdump -MAN= zstreamdump.8 - -.include diff --git a/cddl/usr.bin/zstreamdump/Makefile.depend b/cddl/usr.bin/zstreamdump/Makefile.depend deleted file mode 100644 index 3089536f9717..000000000000 --- a/cddl/usr.bin/zstreamdump/Makefile.depend +++ /dev/null @@ -1,25 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - cddl/lib/libavl \ - cddl/lib/libnvpair \ - cddl/lib/libumem \ - cddl/lib/libzpool \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/libmd \ - lib/libthr \ - lib/libz \ - lib/msun \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/lib/libbe/Makefile b/lib/libbe/Makefile index d1fab41578bf..50a8f8f56fb2 100644 --- a/lib/libbe/Makefile +++ b/lib/libbe/Makefile @@ -58,6 +58,7 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libzfs CFLAGS+= -I${SRCTOP}/sys CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h From owner-dev-commits-src-main@freebsd.org Wed Jun 9 00:06:12 2021 Return-Path: Delivered-To: dev-commits-src-main@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 E5408640CFA; Wed, 9 Jun 2021 00:06:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G06pD6BYGz3lxq; Wed, 9 Jun 2021 00:06: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 BD0EE127D7; Wed, 9 Jun 2021 00:06: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 15906Coo058338; Wed, 9 Jun 2021 00:06:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15906C99058337; Wed, 9 Jun 2021 00:06:12 GMT (envelope-from git) Date: Wed, 9 Jun 2021 00:06:12 GMT Message-Id: <202106090006.15906C99058337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dbbf7cb21ce3 - main - libspl: fix NO_CLEAN build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbbf7cb21ce3e40c9f96a24601fdc536b6e32aca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 00:06:13 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dbbf7cb21ce3e40c9f96a24601fdc536b6e32aca commit dbbf7cb21ce3e40c9f96a24601fdc536b6e32aca Author: Warner Losh AuthorDate: 2021-06-08 23:56:15 +0000 Commit: Warner Losh CommitDate: 2021-06-08 23:56:15 +0000 libspl: fix NO_CLEAN build atomic.S moved to atomic.c, update the cleaup script to remove stale dependencies for this. Sponsored by: Netflix --- tools/build/depend-cleanup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 23bedee1ea26..ae393c2451f0 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -70,3 +70,6 @@ if [ -e "$OBJTOP"/lib/ncurses/ncursesw ]; then echo "Removing stale ncurses objects" rm -rf "$OBJTOP"/lib/ncurses "$OBJTOP"/obj-lib32/lib/ncurses fi + +# 20210608 f20893853e8e move from atomic.S to atomic.c +clean_dep cddl/lib/libspl atomic S From owner-dev-commits-src-main@freebsd.org Wed Jun 9 00:47:39 2021 Return-Path: Delivered-To: dev-commits-src-main@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 517C6641DB4; Wed, 9 Jun 2021 00:47:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G07k31sfbz3pMg; Wed, 9 Jun 2021 00:47: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 286211301A; Wed, 9 Jun 2021 00:47: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 1590ld4B011733; Wed, 9 Jun 2021 00:47:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1590ldKf011732; Wed, 9 Jun 2021 00:47:39 GMT (envelope-from git) Date: Wed, 9 Jun 2021 00:47:39 GMT Message-Id: <202106090047.1590ldKf011732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f530cce55c4f - main - UPDATING: correct typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f530cce55c4ffd33f677bde5e3a2b082abec3875 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 00:47:39 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f530cce55c4ffd33f677bde5e3a2b082abec3875 commit f530cce55c4ffd33f677bde5e3a2b082abec3875 Author: Ed Maste AuthorDate: 2021-06-09 00:46:16 +0000 Commit: Ed Maste CommitDate: 2021-06-09 00:47:05 +0000 UPDATING: correct typo Sponsored by: The FreeBSD Foundation --- UPDATING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index c9e081563e6c..ed27ec0fb9c1 100644 --- a/UPDATING +++ b/UPDATING @@ -28,7 +28,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20210608: - The vendor/openzfs branch was renamed to vnedor/openzfs/legacy to + The vendor/openzfs branch was renamed to vendor/openzfs/legacy to start tracking OpenZFS upstream more closely. Please see https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html for details on how to correct any errors that might result. The From owner-dev-commits-src-main@freebsd.org Wed Jun 9 09:41:34 2021 Return-Path: Delivered-To: dev-commits-src-main@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 CA08464A57B; Wed, 9 Jun 2021 09:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0MZ657zqz3nPv; Wed, 9 Jun 2021 09:41:34 +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 9907319B6B; Wed, 9 Jun 2021 09:41:34 +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 1599fYQu023264; Wed, 9 Jun 2021 09:41:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1599fYAD023263; Wed, 9 Jun 2021 09:41:34 GMT (envelope-from git) Date: Wed, 9 Jun 2021 09:41:34 GMT Message-Id: <202106090941.1599fYAD023263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 20eb6bd8c598 - main - rc.d: liberate powerd from ACPI dependency MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20eb6bd8c598fdbf4e96ed4ca64a609be255ccba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 09:41:34 -0000 The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=20eb6bd8c598fdbf4e96ed4ca64a609be255ccba commit 20eb6bd8c598fdbf4e96ed4ca64a609be255ccba Author: Andriy Gapon AuthorDate: 2021-06-08 17:08:10 +0000 Commit: Andriy Gapon CommitDate: 2021-06-09 09:40:53 +0000 rc.d: liberate powerd from ACPI dependency For instance, many non-ACPI ARM systems have CPU power / frequency levels. Discussed with: manu MFC after: 1 week --- libexec/rc/rc.d/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 0834d8c4c2a0..24a4e7edb9d9 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -78,6 +78,7 @@ CONFS= DAEMON \ pf \ pflog \ pfsync \ + powerd \ ppp \ pppoed \ pwcheck \ @@ -135,10 +136,6 @@ ACPI= power_profile ACPIPACKAGE= acpi .endif -.if ${MK_ACPI} != "no" || ${MK_APM} != "no" -CONFS+= powerd -.endif - .if ${MK_APM} != "no" CONFGROUPS+= APM APM+= apm From owner-dev-commits-src-main@freebsd.org Wed Jun 9 09:43:00 2021 Return-Path: Delivered-To: dev-commits-src-main@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 E1B3F64A395; Wed, 9 Jun 2021 09:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0Mbm65yrz3p6v; Wed, 9 Jun 2021 09:43: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 BA29519E56; Wed, 9 Jun 2021 09:43: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 1599h0fL027222; Wed, 9 Jun 2021 09:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1599h0v6027221; Wed, 9 Jun 2021 09:43:00 GMT (envelope-from git) Date: Wed, 9 Jun 2021 09:43:00 GMT Message-Id: <202106090943.1599h0v6027221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: ffc5dc788f05 - main - rk3328_cru: fix a typo in the SCLK_I2S2 gate definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffc5dc788f05dec5fd11aff8f216c37cd56fcd7f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 09:43:00 -0000 The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ffc5dc788f05dec5fd11aff8f216c37cd56fcd7f commit ffc5dc788f05dec5fd11aff8f216c37cd56fcd7f Author: Andriy Gapon AuthorDate: 2021-06-09 07:44:41 +0000 Commit: Andriy Gapon CommitDate: 2021-06-09 09:41:52 +0000 rk3328_cru: fix a typo in the SCLK_I2S2 gate definition MFC after: 4 days --- sys/arm64/rockchip/clk/rk3328_cru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/clk/rk3328_cru.c b/sys/arm64/rockchip/clk/rk3328_cru.c index e110564f773d..95a87cfd0e00 100644 --- a/sys/arm64/rockchip/clk/rk3328_cru.c +++ b/sys/arm64/rockchip/clk/rk3328_cru.c @@ -114,7 +114,7 @@ static struct rk_cru_gate rk3328_gates[] = { /* CRU_CLKGATE_CON1 */ CRU_GATE(SCLK_I2S0, "clk_i2s0", "clk_i2s0_mux", 0x204, 3) CRU_GATE(SCLK_I2S1, "clk_i2s1", "clk_i2s1_mux", 0x204, 6) - CRU_GATE(SCLK_I2S1, "clk_i2s2", "clk_i2s2_mux", 0x204, 10) + CRU_GATE(SCLK_I2S2, "clk_i2s2", "clk_i2s2_mux", 0x204, 10) /* CRU_CLKGATE_CON4 */ CRU_GATE(0, "gpll_peri", "gpll", 0x210, 0) From owner-dev-commits-src-main@freebsd.org Wed Jun 9 10:31:06 2021 Return-Path: Delivered-To: dev-commits-src-main@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 3849F64B5CD; Wed, 9 Jun 2021 10:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0NgG0vppz3rC7; Wed, 9 Jun 2021 10:31:06 +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 082001A9B4; Wed, 9 Jun 2021 10:31:06 +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 159AV5U3092742; Wed, 9 Jun 2021 10:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159AV5fb092741; Wed, 9 Jun 2021 10:31:05 GMT (envelope-from git) Date: Wed, 9 Jun 2021 10:31:05 GMT Message-Id: <202106091031.159AV5fb092741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa=?= Subject: git: dc318a4ffabc - main - Fix syscall kld example MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc318a4ffabcbfa23bb56a33403aad36e6de30af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 10:31:06 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=dc318a4ffabcbfa23bb56a33403aad36e6de30af commit dc318a4ffabcbfa23bb56a33403aad36e6de30af Author: Fernando Apesteguía AuthorDate: 2021-05-27 12:09:39 +0000 Commit: Fernando Apesteguía CommitDate: 2021-06-09 10:24:26 +0000 Fix syscall kld example PR: 255936 Reported by: splitface@mailfence.com Approved by: gbe (mentor), imp@, jilles@ Differential Revision: https://reviews.freebsd.org/D30498 --- share/examples/kld/syscall/module/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/examples/kld/syscall/module/syscall.c b/share/examples/kld/syscall/module/syscall.c index 701e2492884c..1ee533005b85 100644 --- a/share/examples/kld/syscall/module/syscall.c +++ b/share/examples/kld/syscall/module/syscall.c @@ -51,8 +51,8 @@ hello(struct thread *td, void *arg) * The `sysent' for the new syscall */ static struct sysent hello_sysent = { - 0, /* sy_narg */ - hello /* sy_call */ + .sy_narg = 0, + .sy_call = hello }; /* From owner-dev-commits-src-main@freebsd.org Wed Jun 9 10:36:51 2021 Return-Path: Delivered-To: dev-commits-src-main@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 8D33B64B35B; Wed, 9 Jun 2021 10:36:51 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 4G0Nnv35hyz3s2c; Wed, 9 Jun 2021 10:36:51 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lf1-x130.google.com with SMTP id r198so33917263lff.11; Wed, 09 Jun 2021 03:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YoJ0Ee7506uVcXCsJjQy4zLgFV81bGIrjGXT42uh2ZE=; b=rtLTzbwitocVXByYkfazIJue+BjPgbqOi11ssGkZHrM2yP3Fyh2U9FPwvyQfXr4d+V CTUyka30QosApjWK98I2be70Z1DvZczKo9JF98j5KrJF3XQhAqOCFeHkje43aCBE/cub m51zeT1u7zeID2le8E5qGTjlTQ+NaVRVwpfHkGNOZ0beomdSdTnsMkC6PQY3LKGgfX9C Aieiz0K48RqVmWeEaWt1I3/BgEewsCar0r0WFTdcpIbThuNusVKShghpZe4Ha6sOP06g zRVS9y6VDgThPtvWsTcviBuWKueUTmJoY04wiceY4bLSwen373ee+afyPmBVcW30IMHI +CYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YoJ0Ee7506uVcXCsJjQy4zLgFV81bGIrjGXT42uh2ZE=; b=DHCQWA6tBz1hLGqMQtHZ6/VLlLcLj85tm+Nm+5xYRGcbAcLw5A4icEmlsS9RTRFEnt Pfq2Ce85EManFB3e8HnArQzg+baKW9wQdMYLIegD4WcZaVl0EpkhVZ6iTGwMaNHlBPYY CjmtKBkOAqSrFpIcoZcYYTh2l86n1b7/7URujKd/h3NMsHk+iR+J7diW1nzbHCTds1oi QQlpdaPlWlLUjw9qZ4kwp4a4dAYo5E5RVmC5uE7yQ20ol0qoHRsRqLLeXvqjljb59AkV Cq/HOTQFq5ekHjOwQGkIEdUtfm7ROCUmgKp7Hgxo5eAHaqkR4wQqXt34zx8I9T6R4FuK 5UZg== X-Gm-Message-State: AOAM531K2g29Q5QxOI41sevYsAR/oLjF6U9YyCJUA50Z7wzgqwm7nhsC InP1gkOe0g3rYgHCHekkwKhwUFRLlaL5ImqRcSNPy8py X-Google-Smtp-Source: ABdhPJzFCscB4qJvLS/Hi4tV7RoKJbErQF00n6zpuGLDvG55VznskVn34B6UTL7D0DzK+PUrLMO7p+vx7bvvkmjljuE= X-Received: by 2002:a05:6512:b0f:: with SMTP id w15mr18605416lfu.118.1623235009753; Wed, 09 Jun 2021 03:36:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:651c:2006:0:0:0:0 with HTTP; Wed, 9 Jun 2021 03:36:49 -0700 (PDT) In-Reply-To: <202106081350.158DoTmi096312@gitrepo.freebsd.org> References: <202106081350.158DoTmi096312@gitrepo.freebsd.org> From: Mateusz Guzik Date: Wed, 9 Jun 2021 12:36:49 +0200 Message-ID: Subject: Re: git: 97993d1ebf59 - main - hyperv: Fix vmbus after the i386 4/4 split To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4G0Nnv35hyz3s2c 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 10:36:51 -0000 This breaks i386 LINT kernels: ld: error: undefined symbol: Xvmbus_isr >>> referenced by vmbus.c >>> vmbus.o:(vmbus_intrhook) ld: error: undefined symbol: Xvmbus_isr_pti >>> referenced by vmbus.c >>> vmbus.o:(vmbus_intrhook) On 6/8/21, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=97993d1ebf592ac6689a498d5d0d2afb46758680 > > commit 97993d1ebf592ac6689a498d5d0d2afb46758680 > Author: Mark Johnston > AuthorDate: 2021-06-08 13:40:30 +0000 > Commit: Mark Johnston > CommitDate: 2021-06-08 13:40:30 +0000 > > hyperv: Fix vmbus after the i386 4/4 split > > The vmbus ISR needs to live in a trampoline. Dynamically allocating a > trampoline at driver initialization time poses some difficulties due to > the fact that the KENTER macro assumes that the offset relative to > tramp_idleptd is fixed at static link time. Another problem is that > native_lapic_ipi_alloc() uses setidt(), which assumes a fixed > trampoline > offset. > > Rather than fight this, move the Hyper-V ISR to i386/exception.s. Add > a > new HYPERV kernel option to make this optional, and configure it by > default on i386. This is sufficient to make use of vmbus(4) after the > 4/4 split. Note that vmbus cannot be loaded dynamically and both the > HYPERV option and device must be configured together. I think this is > not too onerous a requirement, since vmbus(4) was previously > non-functional. > > Reported by: Harry Schmalzbauer > Tested by: Harry Schmalzbauer > Reviewed by: whu, kib > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D30577 > --- > sys/conf/files.i386 | 1 - > sys/conf/options.i386 | 3 +++ > sys/dev/hyperv/vmbus/i386/vmbus_vector.S | 6 +++++- > sys/i386/conf/GENERIC | 4 +++- > sys/i386/i386/exception.s | 9 +++++++++ > sys/modules/hyperv/vmbus/Makefile | 5 ++++- > 6 files changed, 24 insertions(+), 4 deletions(-) > > diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 > index 331ad5fec79a..10e286dae271 100644 > --- a/sys/conf/files.i386 > +++ b/sys/conf/files.i386 > @@ -102,7 +102,6 @@ dev/glxiic/glxiic.c optional glxiic > dev/glxsb/glxsb.c optional glxsb > dev/glxsb/glxsb_hash.c optional glxsb > dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv > -dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv > dev/le/if_le_isa.c optional le isa > dev/nctgpio/nctgpio.c optional nctgpio > dev/nfe/if_nfe.c optional nfe pci > diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 > index 4249fa1dfd0a..5e7ea446089b 100644 > --- a/sys/conf/options.i386 > +++ b/sys/conf/options.i386 > @@ -101,6 +101,9 @@ NPX_DEBUG opt_npx.h > # BPF just-in-time compiler > BPF_JITTER opt_bpf.h > > +# Hyper-V support > +HYPERV opt_hyperv.h > + > XENHVM opt_global.h > > # options for the Intel C600 SAS driver (isci) > diff --git a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S > b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S > index 0570c6b49e1c..d119cfdc5b12 100644 > --- a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S > +++ b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S > @@ -35,6 +35,9 @@ > /* > * This is the Hyper-V vmbus channel direct callback interrupt. > * Only used when it is running on Hyper-V. > + * > + * Note that this file is not compiled directly, it is included into > + * i386/exception.s. > */ > .text > SUPERALIGN_TEXT > @@ -45,6 +48,7 @@ IDTVEC(vmbus_isr) > cld > KENTER > pushl %esp > - call vmbus_handle_intr > + mov $vmbus_handle_intr, %eax > + call *%eax > add $4, %esp > jmp doreti > diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC > index 1b4d853fe1d4..288968d84af1 100644 > --- a/sys/i386/conf/GENERIC > +++ b/sys/i386/conf/GENERIC > @@ -339,7 +339,9 @@ device virtio_scsi # VirtIO SCSI device > device virtio_balloon # VirtIO Memory Balloon device > > # HyperV drivers and enhancement support > -device hyperv # HyperV drivers > +# NOTE: HYPERV depends on hyperv. They must be added or removed together. > +options HYPERV # Kernel support for HyperV drivers > +device hyperv # HyperV drivers > > # Xen HVM Guest Optimizations > # NOTE: XENHVM depends on xenpci. They must be added or removed together. > diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s > index 6989d3e2828a..f47ab92f1987 100644 > --- a/sys/i386/i386/exception.s > +++ b/sys/i386/i386/exception.s > @@ -39,6 +39,7 @@ > #include "opt_apic.h" > #include "opt_atpic.h" > #include "opt_hwpmc_hooks.h" > +#include "opt_hyperv.h" > > #include "assym.inc" > > @@ -404,6 +405,14 @@ ENTRY(fork_trampoline) > > #ifdef DEV_APIC > #include > +#endif > + > +#ifdef HYPERV > + .data > + .p2align 4 > + .text > + SUPERALIGN_TEXT > +#include > #endif > > .data > diff --git a/sys/modules/hyperv/vmbus/Makefile > b/sys/modules/hyperv/vmbus/Makefile > index 435106c7e9bd..47a83e76204a 100644 > --- a/sys/modules/hyperv/vmbus/Makefile > +++ b/sys/modules/hyperv/vmbus/Makefile > @@ -13,8 +13,11 @@ SRCS= hyperv.c \ > vmbus_et.c \ > vmbus_if.c \ > vmbus_res.c \ > - vmbus_vector.S \ > vmbus_xact.c > + > +.if ${MACHINE_CPUARCH} != "i386" > +SRCS+= vmbus_vector.S > +.endif > SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h > vmbus_if.h > > # XXX: for assym.inc > -- Mateusz Guzik From owner-dev-commits-src-main@freebsd.org Wed Jun 9 11:31:38 2021 Return-Path: Delivered-To: dev-commits-src-main@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 999DE64BC76; Wed, 9 Jun 2021 11:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0Q163wG9z3vcm; Wed, 9 Jun 2021 11:31:38 +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 6E70B1B475; Wed, 9 Jun 2021 11:31:38 +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 159BVcXn073780; Wed, 9 Jun 2021 11:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159BVcae073779; Wed, 9 Jun 2021 11:31:38 GMT (envelope-from git) Date: Wed, 9 Jun 2021 11:31:38 GMT Message-Id: <202106091131.159BVcae073779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: a664ade93972 - main - tests/netgraph: Fix style MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a664ade93972ce617f0888ff79e715dff9cf0f87 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 11:31:38 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=a664ade93972ce617f0888ff79e715dff9cf0f87 commit a664ade93972ce617f0888ff79e715dff9cf0f87 Author: Lutz Donnerhacke AuthorDate: 2021-06-08 08:46:18 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-09 11:31:16 +0000 tests/netgraph: Fix style Indent all files correctly MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30692 --- tests/sys/netgraph/basic.c | 28 ++++++++----- tests/sys/netgraph/util.c | 100 ++++++++++++++++++++++++--------------------- tests/sys/netgraph/util.h | 58 +++++++++++++++----------- 3 files changed, 105 insertions(+), 81 deletions(-) diff --git a/tests/sys/netgraph/basic.c b/tests/sys/netgraph/basic.c index 6f2e085e4a83..614208ba42a8 100644 --- a/tests/sys/netgraph/basic.c +++ b/tests/sys/netgraph/basic.c @@ -1,4 +1,4 @@ -/* +/*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright 2021 Lutz Donnerhacke @@ -37,17 +37,18 @@ #include "util.h" -static void get_data(void *data, size_t len, void *ctx); +static void get_data(void *data, size_t len, void *ctx); ATF_TC(send_recv); ATF_TC_HEAD(send_recv, conf) { atf_tc_set_md_var(conf, "require.user", "root"); } + ATF_TC_BODY(send_recv, dummy) { - char msg[] = "test"; - int received; + char msg[] = "test"; + int received; ng_init(); ng_connect(".", "a", ".", "b"); @@ -64,10 +65,11 @@ ATF_TC_HEAD(node, conf) { atf_tc_set_md_var(conf, "require.user", "root"); } + ATF_TC_BODY(node, dummy) { - char msg[] = "test"; - int received; + char msg[] = "test"; + int received; ng_init(); ng_mkpeer(".", "a", "hub", "a"); @@ -99,6 +101,7 @@ ATF_TC_HEAD(message, conf) { atf_tc_set_md_var(conf, "require.user", "root"); } + ATF_TC_BODY(message, dummy) { ng_init(); @@ -116,6 +119,7 @@ ATF_TC_HEAD(same_name, conf) { atf_tc_set_md_var(conf, "require.user", "root"); } + ATF_TC_BODY(same_name, dummy) { ng_init(); @@ -139,18 +143,20 @@ ATF_TC_HEAD(queuelimit, conf) { atf_tc_set_md_var(conf, "require.user", "root"); } + ATF_TC_BODY(queuelimit, dummy) { - int received, i; - char msg[] = "test"; - const int MAX = 1000; + int received, i; + char msg[] = "test"; + const int MAX = 1000; ng_init(); ng_connect(".", "a", ".", "b"); ng_register_data("b", get_data); ng_errors(PASS); - for (i = 0; i < MAX; i++) { + for (i = 0; i < MAX; i++) + { ng_send_data("a", msg, sizeof(msg)); if (errno != 0) break; @@ -183,7 +189,7 @@ ATF_TP_ADD_TCS(basic) static void get_data(void *data, size_t len, void *ctx) { - int *cnt = ctx; + int *cnt = ctx; (void)data; printf("Got %zu bytes of data.\n", len); diff --git a/tests/sys/netgraph/util.c b/tests/sys/netgraph/util.c index dbf62599aa04..307bacfa8cc6 100644 --- a/tests/sys/netgraph/util.c +++ b/tests/sys/netgraph/util.c @@ -1,4 +1,4 @@ -/* +/*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright 2021 Lutz Donnerhacke @@ -42,7 +42,7 @@ #include "util.h" -static int cs = -1, ds = -1; +static int cs = -1, ds = -1; static ng_error_t error_handling = FAIL; #define CHECK(r, x) do { \ @@ -54,16 +54,17 @@ static ng_error_t error_handling = FAIL; } \ } while(0) -struct data_handler { - char const *hook; +struct data_handler +{ + char const *hook; ng_data_handler_t handler; - SLIST_ENTRY(data_handler) next; + SLIST_ENTRY(data_handler) next; }; static SLIST_HEAD(, data_handler) data_head = SLIST_HEAD_INITIALIZER(data_head); static ng_msg_handler_t msg_handler = NULL; -static void handle_data(void *ctx); -static void handle_msg(void *ctx); +static void handle_data(void *ctx); +static void handle_msg(void *ctx); void _ng_connect(char const *path1, char const *hook1, @@ -72,29 +73,29 @@ _ng_connect(char const *path1, char const *hook1, { struct ngm_connect c; - strncpy(c.ourhook, hook1, sizeof(c.ourhook)); + strncpy(c.ourhook, hook1, sizeof(c.ourhook)); strncpy(c.peerhook, hook2, sizeof(c.peerhook)); - strncpy(c.path, path2, sizeof(c.path)); + strncpy(c.path, path2, sizeof(c.path)); CHECK(, -1 != NgSendMsg(cs, path1, - NGM_GENERIC_COOKIE, NGM_CONNECT, - &c, sizeof(c))); + NGM_GENERIC_COOKIE, NGM_CONNECT, + &c, sizeof(c))); } void _ng_mkpeer(char const *path1, char const *hook1, - char const *type, char const *hook2, + char const *type, char const *hook2, char const *file, size_t line) { struct ngm_mkpeer p; - strncpy(p.ourhook, hook1, sizeof(p.ourhook)); + strncpy(p.ourhook, hook1, sizeof(p.ourhook)); strncpy(p.peerhook, hook2, sizeof(p.peerhook)); - strncpy(p.type, type, sizeof(p.type)); + strncpy(p.type, type, sizeof(p.type)); CHECK(, -1 != NgSendMsg(cs, path1, - NGM_GENERIC_COOKIE, NGM_MKPEER, - &p, sizeof(p))); + NGM_GENERIC_COOKIE, NGM_MKPEER, + &p, sizeof(p))); } void @@ -106,21 +107,21 @@ _ng_rmhook(char const *path, char const *hook, strncpy(h.ourhook, hook, sizeof(h.ourhook)); CHECK(, -1 != NgSendMsg(cs, path, - NGM_GENERIC_COOKIE, NGM_RMHOOK, - &h, sizeof(h))); + NGM_GENERIC_COOKIE, NGM_RMHOOK, + &h, sizeof(h))); } void _ng_name(char const *path, char const *name, char const *file, size_t line) { - struct ngm_name n; + struct ngm_name n; strncpy(n.name, name, sizeof(n.name)); CHECK(, -1 != NgSendMsg(cs, path, - NGM_GENERIC_COOKIE, NGM_NAME, - &n, sizeof(n))); + NGM_GENERIC_COOKIE, NGM_NAME, + &n, sizeof(n))); } void @@ -128,8 +129,8 @@ _ng_shutdown(char const *path, char const *file, size_t line) { CHECK(, -1 != NgSendMsg(cs, path, - NGM_GENERIC_COOKIE, NGM_SHUTDOWN, - NULL, 0)); + NGM_GENERIC_COOKIE, NGM_SHUTDOWN, + NULL, 0)); } void @@ -152,37 +153,42 @@ _ng_send_data(char const *hook, } void -ng_register_msg(ng_msg_handler_t proc) { +ng_register_msg(ng_msg_handler_t proc) +{ msg_handler = proc; } static void -handle_msg(void *ctx) { +handle_msg(void *ctx) +{ struct ng_mesg *m; - char path[NG_PATHSIZ]; + char path[NG_PATHSIZ]; ATF_REQUIRE(-1 != NgAllocRecvMsg(cs, &m, path)); - if(msg_handler != NULL) - (*msg_handler)(path, m, ctx); + if (msg_handler != NULL) + (*msg_handler) (path, m, ctx); free(m); } static void -handle_data(void *ctx) { - char hook[NG_HOOKSIZ]; +handle_data(void *ctx) +{ + char hook[NG_HOOKSIZ]; struct data_handler *hnd; - u_char *data; - int len; + u_char *data; + int len; ATF_REQUIRE(0 < (len = NgAllocRecvData(ds, &data, hook))); SLIST_FOREACH(hnd, &data_head, next) + { if (0 == strcmp(hnd->hook, hook)) break; + } if (hnd != NULL) - (*(hnd->handler))(data, len, ctx); + (*(hnd->handler)) (data, len, ctx); free(data); } @@ -190,25 +196,26 @@ handle_data(void *ctx) { int ng_handle_event(unsigned int ms, void *context) { - fd_set fds; - int maxfd = (ds < cs) ? cs : ds; - struct timeval timeout = { 0, ms * 1000lu }; + fd_set fds; + int maxfd = (ds < cs) ? cs : ds; + struct timeval timeout = {0, ms * 1000lu}; FD_ZERO(&fds); FD_SET(cs, &fds); FD_SET(ds, &fds); retry: - switch (select(maxfd+1, &fds, NULL, NULL, &timeout)) { + switch (select(maxfd + 1, &fds, NULL, NULL, &timeout)) + { case -1: ATF_REQUIRE_ERRNO(EINTR, 1); goto retry; - case 0: /* timeout */ + case 0: /* timeout */ return 0; - default: /* something to do */ + default: /* something to do */ if (FD_ISSET(cs, &fds)) - handle_msg(context); + handle_msg(context); if (FD_ISSET(ds, &fds)) - handle_data(context); + handle_data(context); return 1; } } @@ -216,7 +223,7 @@ retry: void ng_handle_events(unsigned int ms, void *context) { - while(ng_handle_event(ms, context)) + while (ng_handle_event(ms, context)) ; } @@ -224,7 +231,7 @@ int _ng_send_msg(char const *path, char const *msg, char const *file, size_t line) { - int res; + int res; CHECK(-1, -1 != (res = NgSendAsciiMsg(cs, path, "%s", msg))); return (res); @@ -233,15 +240,16 @@ _ng_send_msg(char const *path, char const *msg, ng_error_t ng_errors(ng_error_t n) { - ng_error_t o = error_handling; + ng_error_t o = error_handling; error_handling = n; return (o); } void -_ng_init(char const *file, size_t line) { - if (cs >= 0) /* prevent reinit */ +_ng_init(char const *file, size_t line) +{ + if (cs >= 0) /* prevent reinit */ return; CHECK(, 0 == NgMkSockNode(NULL, &cs, &ds)); diff --git a/tests/sys/netgraph/util.h b/tests/sys/netgraph/util.h index 41243e15fb10..21ecc68459ea 100644 --- a/tests/sys/netgraph/util.h +++ b/tests/sys/netgraph/util.h @@ -1,4 +1,4 @@ -/* +/*- * SPDX-License-Identifier: BSD-3-Clause * * Copyright 2021 Lutz Donnerhacke @@ -34,54 +34,64 @@ #include -void _ng_connect (char const *path1, char const *hook1, - char const *path2, char const *hook2, - char const *file, size_t line); +void +_ng_connect(char const *path1, char const *hook1, + char const *path2, char const *hook2, + char const *file, size_t line); #define ng_connect(p1,h1,p2,h2) \ _ng_connect(p1,h1,p2,h2,__FILE__,__LINE__) -void _ng_mkpeer (char const *path1, char const *hook1, - char const *type, char const *hook2, - char const *file, size_t line); +void +_ng_mkpeer(char const *path1, char const *hook1, + char const *type, char const *hook2, + char const *file, size_t line); #define ng_mkpeer(p1,h1,t,h2) \ _ng_mkpeer(p1,h1,t,h2,__FILE__,__LINE__) -void _ng_shutdown(char const *path, - char const *file, size_t line); +void +_ng_shutdown(char const *path, + char const *file, size_t line); #define ng_shutdown(p) \ _ng_shutdown(p,__FILE__,__LINE__) -void _ng_rmhook (char const *path, char const *hook, - char const *file, size_t line); +void +_ng_rmhook(char const *path, char const *hook, + char const *file, size_t line); #define ng_rmhook(p,h) \ _ng_rmhook(p,h,__FILE__,__LINE__) -void _ng_name (char const *path, char const *name, - char const *file, size_t line); +void +_ng_name(char const *path, char const *name, + char const *file, size_t line); #define ng_name(p,n) \ _ng_name(p,n,__FILE__,__LINE__) typedef void (*ng_data_handler_t)(void *, size_t, void *ctx); -void ng_register_data(char const *hook, ng_data_handler_t proc); -void _ng_send_data(char const *hook, void const *, size_t, - char const *file, size_t line); +void ng_register_data(char const *hook, ng_data_handler_t proc); +void +_ng_send_data(char const *hook, void const *, size_t, + char const *file, size_t line); #define ng_send_data(h,d,l) \ _ng_send_data(h,d,l,__FILE__,__LINE__) typedef void (*ng_msg_handler_t)(char const *, struct ng_mesg *, void *); -void ng_register_msg(ng_msg_handler_t proc); -int _ng_send_msg(char const *path, char const *msg, - char const *file, size_t line); +void ng_register_msg(ng_msg_handler_t proc); +int +_ng_send_msg(char const *path, char const *msg, + char const *file, size_t line); #define ng_send_msg(p,m) \ _ng_send_msg(p,m,__FILE__,__LINE__) -int ng_handle_event (unsigned int ms, void *ctx); -void ng_handle_events(unsigned int ms, void *ctx); +int ng_handle_event(unsigned int ms, void *ctx); +void ng_handle_events(unsigned int ms, void *ctx); -typedef enum { FAIL, PASS } ng_error_t; -ng_error_t ng_errors(ng_error_t); +typedef enum +{ + FAIL, PASS +} ng_error_t; +ng_error_t ng_errors(ng_error_t); -void _ng_init(char const *file, size_t line); +void _ng_init(char const *file, size_t line); #define ng_init() \ _ng_init(__FILE__,__LINE__) From owner-dev-commits-src-main@freebsd.org Wed Jun 9 11:34:04 2021 Return-Path: Delivered-To: dev-commits-src-main@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 AB9C564C5C7; Wed, 9 Jun 2021 11:34:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0Q3w4Sbnz3vbm; Wed, 9 Jun 2021 11:34: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 8153E1B726; Wed, 9 Jun 2021 11:34: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 159BY4Cg074093; Wed, 9 Jun 2021 11:34:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159BY4e4074092; Wed, 9 Jun 2021 11:34:04 GMT (envelope-from git) Date: Wed, 9 Jun 2021 11:34:04 GMT Message-Id: <202106091134.159BY4e4074092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 5554abd9cc97 - main - tests/netgraph: Factor out univeral data counter functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5554abd9cc9702af30af90925b33c5efff4e7d88 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 11:34:04 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=5554abd9cc9702af30af90925b33c5efff4e7d88 commit 5554abd9cc9702af30af90925b33c5efff4e7d88 Author: Lutz Donnerhacke AuthorDate: 2021-06-08 19:45:20 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-09 11:32:22 +0000 tests/netgraph: Factor out univeral data counter functions Factor out the data counter helpers for other tests to use. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30699 --- tests/sys/netgraph/bridge.c | 104 +++++++++++++++++--------------------------- tests/sys/netgraph/util.c | 20 +++++++++ tests/sys/netgraph/util.h | 17 ++++++++ 3 files changed, 78 insertions(+), 63 deletions(-) diff --git a/tests/sys/netgraph/bridge.c b/tests/sys/netgraph/bridge.c index 41d2346b527b..3e3c0f804278 100644 --- a/tests/sys/netgraph/bridge.c +++ b/tests/sys/netgraph/bridge.c @@ -43,11 +43,6 @@ #include "util.h" #include -static void get_data0(void *data, size_t len, void *ctx); -static void get_data1(void *data, size_t len, void *ctx); -static void get_data2(void *data, size_t len, void *ctx); -static void get_data3(void *data, size_t len, void *ctx); - static void get_tablesize(char const *source, struct ng_mesg *msg, void *ctx); struct gettable { @@ -90,7 +85,7 @@ ATF_TC_HEAD(basic, conf) ATF_TC_BODY(basic, dummy) { - int r[4]; + ng_counter_t r; struct gettable rm; ng_init(); @@ -105,7 +100,7 @@ ATF_TC_BODY(basic, dummy) /* do not bounce back */ ng_register_data("a", get_data0); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; ng_send_data("a", &msg4, sizeof(msg4)); ng_handle_events(50, &r); @@ -114,26 +109,26 @@ ATF_TC_BODY(basic, dummy) /* send to others */ ng_register_data("b", get_data1); ng_register_data("c", get_data2); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; ng_send_data("a", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 2; ng_send_data("b", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 3; ng_send_data("c", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 1 && r[1] == 1 && r[2] == 0); /* send to learned unicast */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; msg4.eh.ether_dhost[5] = 3; ng_send_data("a", &msg4, sizeof(msg4)); @@ -149,7 +144,7 @@ ATF_TC_BODY(basic, dummy) /* remove a link */ ng_rmhook(".", "b"); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; msg4.eh.ether_dhost[5] = 0; ng_send_data("a", &msg4, sizeof(msg4)); @@ -196,7 +191,8 @@ ATF_TC_HEAD(loop, conf) ATF_TC_BODY(loop, dummy) { - int r[4], i; + ng_counter_t r; + int i; ng_init(); ng_errors(PASS); @@ -221,7 +217,7 @@ ATF_TC_BODY(loop, dummy) */ ng_connect("bridge1:", "link11", "bridge2:", "link11"); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; ng_send_data("a", &msg4, sizeof(msg4)); ng_handle_events(50, &r); @@ -236,7 +232,7 @@ ATF_TC_BODY(loop, dummy) */ ng_connect("bridge1:", "link12", "bridge2:", "link12"); - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; ng_errors(PASS); ng_send_data("a", &msg4, sizeof(msg4)); @@ -259,7 +255,8 @@ ATF_TC_HEAD(many_unicasts, conf) ATF_TC_BODY(many_unicasts, dummy) { - int r[4], i; + ng_counter_t r; + int i; const int HOOKS = 1000; struct gettable rm; @@ -273,7 +270,7 @@ ATF_TC_BODY(many_unicasts, dummy) ng_register_data("a", get_data0); /* learn MAC */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[3] = 0xff; ng_send_data("a", &msg4, sizeof(msg4)); ng_handle_events(50, &r); @@ -284,7 +281,7 @@ ATF_TC_BODY(many_unicasts, dummy) msg4.eh.ether_dhost[3] = 0xff; /* now send */ - bzero(r, sizeof(r)); + ng_counter_clear(r); for (i = 1; i <= HOOKS; i++) { char hook[20]; @@ -330,7 +327,8 @@ ATF_TC_HEAD(many_broadcasts, conf) ATF_TC_BODY(many_broadcasts, dummy) { - int r[4], i; + ng_counter_t r; + int i; const int HOOKS = 1000; ng_init(); @@ -343,7 +341,7 @@ ATF_TC_BODY(many_broadcasts, dummy) ng_register_data("a", get_data0); /* learn MAC */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[3] = 0xff; ng_send_data("a", &msg4, sizeof(msg4)); ng_handle_events(50, &r); @@ -354,7 +352,7 @@ ATF_TC_BODY(many_broadcasts, dummy) memset(msg4.eh.ether_dhost, 0xff, sizeof(msg4.eh.ether_dhost)); /* now send */ - bzero(r, sizeof(r)); + ng_counter_clear(r); for (i = 1; i <= HOOKS; i++) { char hook[20]; @@ -389,7 +387,7 @@ ATF_TC_HEAD(uplink_private, conf) ATF_TC_BODY(uplink_private, dummy) { - int r[4]; + ng_counter_t r; struct gettable rm; ng_init(); @@ -410,14 +408,14 @@ ATF_TC_BODY(uplink_private, dummy) ng_register_data("l3", get_data3); /* unknown unicast 0 from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; ng_send_data("u1", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 0); /* unknown unicast 2 from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; msg4.eh.ether_dhost[5] = 2; ng_send_data("l0", &msg4, sizeof(msg4)); @@ -425,7 +423,7 @@ ATF_TC_BODY(uplink_private, dummy) ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 0); /* known unicast 0 from uplink2 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 2; msg4.eh.ether_dhost[5] = 0; ng_send_data("u2", &msg4, sizeof(msg4)); @@ -433,7 +431,7 @@ ATF_TC_BODY(uplink_private, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); /* known unicast 0 from link3 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 3; msg4.eh.ether_dhost[5] = 0; ng_send_data("l3", &msg4, sizeof(msg4)); @@ -441,7 +439,7 @@ ATF_TC_BODY(uplink_private, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); /* (un)known unicast 2 from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; msg4.eh.ether_dhost[5] = 2; ng_send_data("u1", &msg4, sizeof(msg4)); @@ -449,14 +447,14 @@ ATF_TC_BODY(uplink_private, dummy) ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 0); /* (un)known unicast 2 from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; ng_send_data("l0", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 0); /* unknown multicast 2 from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; msg4.eh.ether_dhost[0] = 0xff; ng_send_data("u1", &msg4, sizeof(msg4)); @@ -464,14 +462,14 @@ ATF_TC_BODY(uplink_private, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); /* unknown multicast 2 from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; ng_send_data("l0", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); /* broadcast from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; memset(msg4.eh.ether_dhost, 0xff, sizeof(msg4.eh.ether_dhost)); ng_send_data("u1", &msg4, sizeof(msg4)); @@ -479,7 +477,7 @@ ATF_TC_BODY(uplink_private, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); /* broadcast from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; ng_send_data("l0", &msg4, sizeof(msg4)); ng_handle_events(50, &r); @@ -503,7 +501,7 @@ ATF_TC_HEAD(uplink_classic, conf) ATF_TC_BODY(uplink_classic, dummy) { - int r[4]; + ng_counter_t r; struct gettable rm; ng_init(); @@ -524,14 +522,14 @@ ATF_TC_BODY(uplink_classic, dummy) ng_register_data("l3", get_data3); /* unknown unicast 0 from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; ng_send_data("u1", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); /* unknown unicast 2 from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; msg4.eh.ether_dhost[5] = 2; ng_send_data("l0", &msg4, sizeof(msg4)); @@ -539,7 +537,7 @@ ATF_TC_BODY(uplink_classic, dummy) ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); /* known unicast 0 from uplink2 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 2; msg4.eh.ether_dhost[5] = 0; ng_send_data("u2", &msg4, sizeof(msg4)); @@ -547,7 +545,7 @@ ATF_TC_BODY(uplink_classic, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); /* known unicast 0 from link3 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 3; msg4.eh.ether_dhost[5] = 0; ng_send_data("l3", &msg4, sizeof(msg4)); @@ -555,7 +553,7 @@ ATF_TC_BODY(uplink_classic, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); /* (un)known unicast 2 from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; msg4.eh.ether_dhost[5] = 2; ng_send_data("u1", &msg4, sizeof(msg4)); @@ -563,14 +561,14 @@ ATF_TC_BODY(uplink_classic, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); /* (un)known unicast 2 from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; ng_send_data("l0", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); /* unknown multicast 2 from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; msg4.eh.ether_dhost[0] = 0xff; ng_send_data("u1", &msg4, sizeof(msg4)); @@ -578,14 +576,14 @@ ATF_TC_BODY(uplink_classic, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); /* unknown multicast 2 from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; ng_send_data("l0", &msg4, sizeof(msg4)); ng_handle_events(50, &r); ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1 && r[3] == 1); /* broadcast from uplink1 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 1; memset(msg4.eh.ether_dhost, 0xff, sizeof(msg4.eh.ether_dhost)); ng_send_data("u1", &msg4, sizeof(msg4)); @@ -593,7 +591,7 @@ ATF_TC_BODY(uplink_classic, dummy) ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 1 && r[3] == 1); /* broadcast from link0 */ - bzero(r, sizeof(r)); + ng_counter_clear(r); msg4.eh.ether_shost[5] = 0; ng_send_data("l0", &msg4, sizeof(msg4)); ng_handle_events(50, &r); @@ -622,26 +620,6 @@ ATF_TP_ADD_TCS(bridge) return atf_no_error(); } -static inline void -_get_data(void *data, size_t len, void *ctx, int i) -{ - int *cnt = ctx; - - (void)data; - fprintf(stderr, "[%d] Got %zu bytes of data.\n", i, len); - cnt[i]++; -} - -#define GD(x) static void \ -get_data##x(void *data, size_t len, void *ctx) {\ - _get_data(data, len, ctx, x); \ -} - -GD(0) -GD(1) -GD(2) -GD(3) - static void get_tablesize(char const *source, struct ng_mesg *msg, void *ctx) { diff --git a/tests/sys/netgraph/util.c b/tests/sys/netgraph/util.c index 307bacfa8cc6..b25e63dfa76d 100644 --- a/tests/sys/netgraph/util.c +++ b/tests/sys/netgraph/util.c @@ -255,3 +255,23 @@ _ng_init(char const *file, size_t line) CHECK(, 0 == NgMkSockNode(NULL, &cs, &ds)); NgSetDebug(3); } + +#define GD(x) void \ +get_data##x(void *data, size_t len, void *ctx) {\ + int *cnt = ctx; \ + \ + (void)data; \ + (void)len; \ + cnt[x]++; \ +} + +GD(0) +GD(1) +GD(2) +GD(3) +GD(4) +GD(5) +GD(6) +GD(7) +GD(8) +GD(9) diff --git a/tests/sys/netgraph/util.h b/tests/sys/netgraph/util.h index 21ecc68459ea..44c9f3a360a7 100644 --- a/tests/sys/netgraph/util.h +++ b/tests/sys/netgraph/util.h @@ -95,3 +95,20 @@ ng_error_t ng_errors(ng_error_t); void _ng_init(char const *file, size_t line); #define ng_init() \ _ng_init(__FILE__,__LINE__) + +/* Helper function to count received data */ + +typedef int ng_counter_t[10]; +#define ng_counter_clear(x)\ + bzero((x), sizeof(x)) + +void get_data0(void *data, size_t len, void *ctx); +void get_data1(void *data, size_t len, void *ctx); +void get_data2(void *data, size_t len, void *ctx); +void get_data3(void *data, size_t len, void *ctx); +void get_data4(void *data, size_t len, void *ctx); +void get_data5(void *data, size_t len, void *ctx); +void get_data6(void *data, size_t len, void *ctx); +void get_data7(void *data, size_t len, void *ctx); +void get_data8(void *data, size_t len, void *ctx); +void get_data9(void *data, size_t len, void *ctx); From owner-dev-commits-src-main@freebsd.org Wed Jun 9 11:39:34 2021 Return-Path: Delivered-To: dev-commits-src-main@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 B08E064C322; Wed, 9 Jun 2021 11:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0QBG4cVLz3vr7; Wed, 9 Jun 2021 11:39:34 +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 826C21BA01; Wed, 9 Jun 2021 11:39:34 +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 159BdY1I074558; Wed, 9 Jun 2021 11:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159BdYta074557; Wed, 9 Jun 2021 11:39:34 GMT (envelope-from git) Date: Wed, 9 Jun 2021 11:39:34 GMT Message-Id: <202106091139.159BdYta074557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 7863faa78ae2 - main - tests/netgraph: Tests for ng_hub MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7863faa78ae271017c404c635b2a9d07379d4316 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 11:39:34 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=7863faa78ae271017c404c635b2a9d07379d4316 commit 7863faa78ae271017c404c635b2a9d07379d4316 Author: Lutz Donnerhacke AuthorDate: 2021-06-03 22:22:29 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-09 11:36:23 +0000 tests/netgraph: Tests for ng_hub Test functionality of ng_hub(4): - replicting traffic to anything but the sending hook - persistence - an unrestricted loop - implementation limits with many hooks. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30633 --- tests/sys/netgraph/Makefile | 2 + tests/sys/netgraph/hub.c | 231 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+) diff --git a/tests/sys/netgraph/Makefile b/tests/sys/netgraph/Makefile index 7376cb5c1227..2ae9882b2bc3 100644 --- a/tests/sys/netgraph/Makefile +++ b/tests/sys/netgraph/Makefile @@ -12,9 +12,11 @@ TEST_METADATA.ng_macfilter_test+= required_programs="perl" ATF_TESTS_C+= basic \ bridge \ + hub \ SRCS.basic= basic.c util.c SRCS.bridge= bridge.c util.c +SRCS.hub= hub.c util.c LIBADD+= netgraph diff --git a/tests/sys/netgraph/hub.c b/tests/sys/netgraph/hub.c new file mode 100644 index 000000000000..08d083ad9605 --- /dev/null +++ b/tests/sys/netgraph/hub.c @@ -0,0 +1,231 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright 2021 Lutz Donnerhacke + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +#include +#include + +#include "util.h" + +ATF_TC(basic); +ATF_TC_HEAD(basic, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(basic, dummy) +{ + char msg[] = "test"; + ng_counter_t r; + + ng_errors(PASS); + ng_shutdown("hub:"); + ng_errors(FAIL); + + ng_init(); + ng_mkpeer(".", "a", "hub", "a"); + ng_name("a", "hub"); + ng_connect(".", "b", "hub:", "b"); + ng_connect(".", "c", "hub:", "c"); + + /* do not bounce back */ + ng_register_data("a", get_data0); + ng_counter_clear(r); + ng_send_data("a", msg, sizeof(msg)); + ng_handle_events(50, r); + ATF_CHECK(r[0] == 0); + + /* send to others */ + ng_register_data("b", get_data0); + ng_register_data("c", get_data0); + ng_counter_clear(r); + ng_send_data("a", msg, sizeof(msg)); + ng_handle_events(50, r); + ATF_CHECK(r[0] == 2); + + ng_counter_clear(r); + ng_send_data("b", msg, sizeof(msg)); + ng_handle_events(50, r); + ATF_CHECK(r[0] == 2); + + ng_counter_clear(r); + ng_send_data("c", msg, sizeof(msg)); + ng_handle_events(50, r); + ATF_CHECK(r[0] == 2); + + /* remove a link */ + ng_rmhook(".", "b"); + ng_counter_clear(r); + ng_send_data("a", msg, sizeof(msg)); + ng_handle_events(50, r); + ATF_CHECK(r[0] == 1); + + ng_shutdown("hub:"); +} + +ATF_TC(persistence); +ATF_TC_HEAD(persistence, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(persistence, dummy) +{ + ng_errors(PASS); + ng_shutdown("hub:"); + ng_errors(FAIL); + + ng_init(); + ng_mkpeer(".", "a", "hub", "a"); + ng_name("a", "hub"); + + ng_send_msg("hub:", "setpersistent"); + ng_rmhook(".", "a"); + + ng_shutdown("hub:"); +} + +ATF_TC(loop); +ATF_TC_HEAD(loop, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(loop, dummy) +{ + ng_counter_t r; + int i; + char msg[] = "LOOP Alert!"; + + ng_errors(PASS); + ng_shutdown("hub1:"); + ng_shutdown("hub2:"); + ng_errors(FAIL); + + ng_init(); + ng_mkpeer(".", "a", "hub", "a"); + ng_name("a", "hub1"); + ng_mkpeer(".", "b", "hub", "b"); + ng_name("b", "hub2"); + + ng_register_data("a", get_data0); + ng_register_data("b", get_data0); + + /*- + * Open loop + * + * /-- hub1 + * . < | + * \-- hub2 + */ + ng_connect("hub1:", "xc1", "hub2:", "xc1"); + + ng_counter_clear(r); + ng_send_data("a", msg, sizeof(msg)); + ng_handle_events(50, r); + ATF_CHECK(r[0] == 1); + + /*- + * Closed loop, DANGEROUS! + * + * /-- hub1 -\ + * . < | | + * \-- hub2 -/ + */ + ng_connect("hub1:", "xc2", "hub2:", "xc2"); + + ng_counter_clear(r); + ng_send_data("a", msg, sizeof(msg)); + for (i = 0; i < 10; i++) /* don't run forever */ + if (!ng_handle_event(50, r)) + break; + ATF_CHECK(r[0] > 7); + + ng_shutdown("hub1:"); + ng_shutdown("hub2:"); +} + +ATF_TC(many_hooks); +ATF_TC_HEAD(many_hooks, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(many_hooks, dummy) +{ + ng_counter_t r; + int i; + char msg[] = "test"; + const int HOOKS = 1000; + + ng_errors(PASS); + ng_shutdown("hub:"); + ng_errors(FAIL); + + ng_init(); + ng_mkpeer(".", "a", "hub", "a"); + ng_name("a", "hub"); + + ng_register_data("a", get_data0); + ng_counter_clear(r); + for (i = 0; i < HOOKS; i++) + { + char hook[20]; + + snprintf(hook, sizeof(hook), "hook%d", i); + ng_connect(".", hook, "hub:", hook); + ng_errors(PASS); + ng_send_data(hook, msg, sizeof(msg)); + ng_errors(FAIL); + if (errno != 0) + break; + ng_handle_events(50, r); + } + ATF_CHECK(r[0] > 100); + atf_tc_expect_fail("Implementation limitation (%d)", i); + ATF_CHECK(r[0] == HOOKS); + atf_tc_expect_pass(); + + ng_shutdown("hub:"); +} + + +ATF_TP_ADD_TCS(hub) +{ + ATF_TP_ADD_TC(hub, basic); + ATF_TP_ADD_TC(hub, loop); + ATF_TP_ADD_TC(hub, persistence); + ATF_TP_ADD_TC(hub, many_hooks); + + return atf_no_error(); +} From owner-dev-commits-src-main@freebsd.org Wed Jun 9 11:46:48 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2EF1E64C726; Wed, 9 Jun 2021 11:46:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0QLc0s9dz3wJF; Wed, 9 Jun 2021 11:46: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 01C5D1BA19; Wed, 9 Jun 2021 11:46: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 159Bkldd087259; Wed, 9 Jun 2021 11:46:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159BklZV087258; Wed, 9 Jun 2021 11:46:47 GMT (envelope-from git) Date: Wed, 9 Jun 2021 11:46:47 GMT Message-Id: <202106091146.159BklZV087258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 6b08e68be111 - main - tests/netgraph: Tests for ng_vlan_rotate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b08e68be111d50931b0d30145f8b7e3402decaf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 11:46:48 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=6b08e68be111d50931b0d30145f8b7e3402decaf commit 6b08e68be111d50931b0d30145f8b7e3402decaf Author: Lutz Donnerhacke AuthorDate: 2021-06-06 23:56:12 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-09 11:45:37 +0000 tests/netgraph: Tests for ng_vlan_rotate Test functionality of ng_vlan_rotate(4): - Rotate 1 to 9 stagged vlans in any possible direction and length - Rotate random combinations of ethertypes (8100, 88a8, 9100) - Automatic reverse rotating for backward data flow - Test too many and to few vlans Reviewed by: kp (earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30670 --- tests/sys/netgraph/Makefile | 8 +- tests/sys/netgraph/vlan_rotate.c | 335 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+), 3 deletions(-) diff --git a/tests/sys/netgraph/Makefile b/tests/sys/netgraph/Makefile index 2ae9882b2bc3..f397e66a22bc 100644 --- a/tests/sys/netgraph/Makefile +++ b/tests/sys/netgraph/Makefile @@ -10,13 +10,15 @@ TAP_TESTS_SH+= ng_macfilter_test TEST_METADATA.ng_macfilter_test+= required_user="root" TEST_METADATA.ng_macfilter_test+= required_programs="perl" -ATF_TESTS_C+= basic \ - bridge \ - hub \ +ATF_TESTS_C+= basic \ + bridge \ + hub \ + vlan_rotate \ SRCS.basic= basic.c util.c SRCS.bridge= bridge.c util.c SRCS.hub= hub.c util.c +SRCS.vlan_rotate=vlan_rotate.c util.c LIBADD+= netgraph diff --git a/tests/sys/netgraph/vlan_rotate.c b/tests/sys/netgraph/vlan_rotate.c new file mode 100644 index 000000000000..8df3ab981a7c --- /dev/null +++ b/tests/sys/netgraph/vlan_rotate.c @@ -0,0 +1,335 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright 2021 Lutz Donnerhacke + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +#include +#include +#include + +#include +#include + +#include "util.h" +#include + +struct vlan +{ + uint16_t proto; + uint16_t tag; +} __packed; + +struct frame +{ + u_char dst[ETHER_ADDR_LEN]; + u_char src[ETHER_ADDR_LEN]; + struct vlan vlan[10]; +} __packed; + +static struct frame msg = { + .src = {2, 4, 6, 1, 3, 5}, + .dst = {2, 4, 6, 1, 3, 7}, + .vlan[0] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(1, 0, 0))}, + .vlan[1] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(2, 0, 0))}, + .vlan[2] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(3, 0, 0))}, + .vlan[3] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(4, 0, 0))}, + .vlan[4] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(5, 0, 0))}, + .vlan[5] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(6, 0, 0))}, + .vlan[6] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(7, 0, 0))}, + .vlan[7] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(8, 0, 0))}, + .vlan[8] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(9, 0, 0))}, + .vlan[9] = {0} +}; + +static void _basic(int); +static void get_vlan(void *data, size_t len, void *ctx); + +static void +get_vlan(void *data, size_t len, void *ctx) +{ + int *v = ctx, i; + struct frame *f = data; + + (void)len; + for (i = 0; i < 10; i++) + v[i] = EVL_VLANOFTAG(ntohs(f->vlan[i].tag)); +} + +static void +_basic(int direction) +{ + int r[10]; + int i, rot, len; + + ng_init(); + ng_errors(PASS); + ng_shutdown("vr:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "vlan_rotate", direction > 0 ? "original" : "ordered"); + ng_name("a", "vr"); + ng_connect(".", "b", "vr:", direction > 0 ? "ordered" : "original"); + ng_register_data("b", get_vlan); + + for (len = 9; len > 0; len--) + { + /* reduce the number of vlans */ + msg.vlan[len].proto = htons(ETHERTYPE_IP); + + for (rot = -len + 1; rot < len; rot++) + { + char cmd[40]; + + /* set rotation offset */ + snprintf(cmd, sizeof(cmd), "setconf { min=0 max=9 rot=%d }", rot); + ng_send_msg("vr:", cmd); + + ng_send_data("a", &msg, sizeof(msg)); + ng_handle_events(50, &r); + + /* check rotation */ + for (i = 0; i < len; i++) + { + int expect = (2 * len + i - direction * rot) % len + 1; + int vlan = r[i]; + + ATF_CHECK_MSG(vlan == expect, + "len=%d rot=%d i=%d -> vlan=%d, expect=%d", + len, rot, i, r[i], expect); + } + } + } + + ng_shutdown("vr:"); +} + +ATF_TC(basic); +ATF_TC_HEAD(basic, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(basic, dummy) +{ + _basic(1); +} + +ATF_TC(reverse); +ATF_TC_HEAD(reverse, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(reverse, dummy) +{ + _basic(-1); +} + +static void _ethertype(int); +static void get_ethertype(void *data, size_t len, void *ctx); + +static void +get_ethertype(void *data, size_t len, void *ctx) +{ + int *v = ctx, i; + struct frame *f = data; + + (void)len; + for (i = 0; i < 10; i++) + v[i] = ntohs(f->vlan[i].proto); +} + +static void +_ethertype(int direction) +{ + int r[10]; + int i, rounds = 20; + + ng_init(); + ng_errors(PASS); + ng_shutdown("vr:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "vlan_rotate", direction > 0 ? "original" : "ordered"); + ng_name("a", "vr"); + ng_connect(".", "b", "vr:", direction > 0 ? "ordered" : "original"); + ng_register_data("b", get_ethertype); + + while (rounds-- > 0) + { + char cmd[40]; + int len = 9; + int rot = rand() % (2 * len - 1) - len + 1; + int vlan[10]; + + for (i = 0; i < len; i++) + { + switch (rand() % 3) + { + default: + msg.vlan[i].proto = htons(ETHERTYPE_VLAN); + break; + case 1: + msg.vlan[i].proto = htons(ETHERTYPE_QINQ); + break; + case 2: + msg.vlan[i].proto = htons(ETHERTYPE_8021Q9100); + break; + } + } + msg.vlan[i].proto = htons(ETHERTYPE_IP); + + for (i = 0; i < len; i++) + vlan[i] = msg.vlan[i].proto; + + snprintf(cmd, sizeof(cmd), "setconf { min=0 max=9 rot=%d }", rot); + ng_send_msg("vr:", cmd); + + bzero(r, sizeof(r)); + ng_send_data("a", &msg, sizeof(msg)); + ng_handle_events(50, &r); + + /* check rotation */ + for (i = 0; i < len; i++) + { + int expect = (2 * len + i - direction * rot) % len; + + ATF_CHECK_MSG(r[i] == ntohs(vlan[expect]), + "len=%d rot=%d i=%d -> vlan=%04x, expect(%d)=%04x", + len, rot, i, ntohs(r[i]), expect, vlan[expect]); + } + } + + ng_shutdown("vr:"); +} + +ATF_TC(ethertype); +ATF_TC_HEAD(ethertype, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(ethertype, dummy) +{ + _ethertype(1); +} + +ATF_TC(typeether); +ATF_TC_HEAD(typeether, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(typeether, dummy) +{ + _ethertype(-1); +} + +ATF_TC(minmax); +ATF_TC_HEAD(minmax, conf) +{ + atf_tc_set_md_var(conf, "require.user", "root"); +} + +ATF_TC_BODY(minmax, dummy) +{ + ng_counter_t r; + int len; + + ng_init(); + ng_errors(PASS); + ng_shutdown("vr:"); + ng_errors(FAIL); + + ng_mkpeer(".", "a", "vlan_rotate", "original"); + ng_name("a", "vr"); + ng_connect(".", "b", "vr:", "ordered"); + ng_connect(".", "c", "vr:", "excessive"); + ng_connect(".", "d", "vr:", "incomplete"); + ng_register_data("a", get_data0); + ng_register_data("b", get_data1); + ng_register_data("c", get_data2); + ng_register_data("d", get_data3); + + ng_send_msg("vr:", "setconf { min=3 max=7 rot=0 }"); + for (len = 9; len > 0; len--) + { + /* reduce the number of vlans */ + msg.vlan[len].proto = htons(ETHERTYPE_IP); + + ng_counter_clear(r); + ng_send_data("a", &msg, sizeof(msg)); + ng_handle_events(50, &r); + if (len < 3) + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 0 && r[3] == 1); + else if (len > 7) + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 0); + else + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 0 && r[3] == 0); + + ng_counter_clear(r); + ng_send_data("b", &msg, sizeof(msg)); + ng_handle_events(50, &r); + if (len < 3) + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 0 && r[3] == 1); + else if (len > 7) + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1 && r[3] == 0); + else + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + + ng_counter_clear(r); + ng_send_data("c", &msg, sizeof(msg)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + + ng_counter_clear(r); + ng_send_data("d", &msg, sizeof(msg)); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1 && r[1] == 0 && r[2] == 0 && r[3] == 0); + } + + ng_shutdown("vr:"); +} + +ATF_TP_ADD_TCS(vlan_rotate) +{ + /* Use "dd if=/dev/random bs=2 count=1 | od -x" to reproduce */ + srand(0xb93b); + + ATF_TP_ADD_TC(vlan_rotate, basic); + ATF_TP_ADD_TC(vlan_rotate, ethertype); + ATF_TP_ADD_TC(vlan_rotate, reverse); + ATF_TP_ADD_TC(vlan_rotate, typeether); + ATF_TP_ADD_TC(vlan_rotate, minmax); + + return atf_no_error(); +} From owner-dev-commits-src-main@freebsd.org Wed Jun 9 13:01:39 2021 Return-Path: Delivered-To: dev-commits-src-main@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 7A43A64DC85; Wed, 9 Jun 2021 13:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0S0z2y5Dz4Wvt; Wed, 9 Jun 2021 13:01: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 4DCF01CCFE; Wed, 9 Jun 2021 13:01: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 159D1d2P092789; Wed, 9 Jun 2021 13:01:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159D1d97092788; Wed, 9 Jun 2021 13:01:39 GMT (envelope-from git) Date: Wed, 9 Jun 2021 13:01:39 GMT Message-Id: <202106091301.159D1d97092788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 334335cb14d4 - main - i386: Add "options HYPERV" to NOTES MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 334335cb14d4754d45265d19cd3c6e7708cca0c1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 13:01:39 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=334335cb14d4754d45265d19cd3c6e7708cca0c1 commit 334335cb14d4754d45265d19cd3c6e7708cca0c1 Author: Mark Johnston AuthorDate: 2021-06-09 12:58:45 +0000 Commit: Mark Johnston CommitDate: 2021-06-09 13:01:22 +0000 i386: Add "options HYPERV" to NOTES This unbreaks the LINT build. Fixes: 97993d1ebf Reported by: mjg MFC after: 13 days --- sys/i386/conf/NOTES | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 81d2140ebfa5..e02426df2df2 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -719,7 +719,8 @@ device virtio_balloon # VirtIO Memory Balloon device device virtio_random # VirtIO Entropy device device virtio_console # VirtIO Console device -device hyperv # HyperV drivers +options HYPERV +device hyperv # HyperV drivers ##################################################################### From owner-dev-commits-src-main@freebsd.org Wed Jun 9 15:04:10 2021 Return-Path: Delivered-To: dev-commits-src-main@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 9B45464EE55; Wed, 9 Jun 2021 15:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0VkL3xRrz4mqn; Wed, 9 Jun 2021 15:04: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 6D9BF1E536; Wed, 9 Jun 2021 15:04: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 159F4AXH051672; Wed, 9 Jun 2021 15:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159F4AdN051671; Wed, 9 Jun 2021 15:04:10 GMT (envelope-from git) Date: Wed, 9 Jun 2021 15:04:10 GMT Message-Id: <202106091504.159F4AdN051671@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: 5e5ca4c8fc53 - main - nfscl: Add a "has acquired a delegation" flag for delegations 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: 5e5ca4c8fc53d31bf71e182e08c4ccd8290428c7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 15:04:10 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5e5ca4c8fc53d31bf71e182e08c4ccd8290428c7 commit 5e5ca4c8fc53d31bf71e182e08c4ccd8290428c7 Author: Rick Macklem AuthorDate: 2021-06-09 15:00:43 +0000 Commit: Rick Macklem CommitDate: 2021-06-09 15:00:43 +0000 nfscl: Add a "has acquired a delegation" flag for delegations A problem was reported via email, where a large (130000+) accumulation of NFSv4 opens on an NFSv4 mount caused significant lock contention on the mutex used to protect the client mount's open/lock state. Although the root cause for the accumulation of opens was not resolved, it is obvious that the NFSv4 client is not designed to handle 100000+ opens efficiently. For a common case where delegations are not being issued by the NFSv4 server, the code acquires the mutex lock for open/lock state, finds the delegation list empty and just unlocks the mutex and returns. This patch adds an NFS mount point flag that is set when a delegation is issued for the mount. Then the patched code checks for this flag before acquiring the open/lock mutex, avoiding the need to acquire the lock for the case where delegations are not being issued by the NFSv4 server. This change appears to be performance neutral for a small number of opens, but should reduce lock contention for a large number of opens for the common case where server is not issuing delegations. This commit should not affect the high level semantics of delegation handling. MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clstate.c | 44 +++++++++++++++++++++++++++++++++++++++--- sys/fs/nfsclient/nfsmount.h | 1 + 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 5e4ac2ae9d4d..0659e77289e9 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -438,20 +438,32 @@ nfscl_deleg(mount_t mp, struct nfsclclient *clp, u_int8_t *nfhp, int fhlen, struct ucred *cred, NFSPROC_T *p, struct nfscldeleg **dpp) { struct nfscldeleg *dp = *dpp, *tdp; + struct nfsmount *nmp; + KASSERT(mp != NULL, ("nfscl_deleg: mp NULL")); + nmp = VFSTONFS(mp); /* * First, if we have received a Read delegation for a file on a * read/write file system, just return it, because they aren't * useful, imho. */ - if (mp != NULL && dp != NULL && !NFSMNT_RDONLY(mp) && + if (dp != NULL && !NFSMNT_RDONLY(mp) && (dp->nfsdl_flags & NFSCLDL_READ)) { - (void) nfscl_trydelegreturn(dp, cred, VFSTONFS(mp), p); + nfscl_trydelegreturn(dp, cred, nmp, p); free(dp, M_NFSCLDELEG); *dpp = NULL; return (0); } + /* + * Since a delegation might be added to the mount, + * set NFSMNTP_DELEGISSUED now. If a delegation already + * exagain ists, setting this flag is harmless. + */ + NFSLOCKMNT(nmp); + nmp->nm_privflag |= NFSMNTP_DELEGISSUED; + NFSUNLOCKMNT(nmp); + /* Look for the correct deleg, based upon FH */ NFSLOCKCLSTATE(); tdp = nfscl_finddeleg(clp, nfhp, fhlen); @@ -3356,12 +3368,20 @@ nfscl_delegreturnvp(vnode_t vp, NFSPROC_T *p) struct nfscldeleg *dp; struct ucred *cred; struct nfsnode *np; + struct nfsmount *nmp; + nmp = VFSTONFS(vp->v_mount); + NFSLOCKMNT(nmp); + if ((nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0) { + NFSUNLOCKMNT(nmp); + return; + } + NFSUNLOCKMNT(nmp); np = VTONFS(vp); cred = newnfs_getcred(); dp = NULL; NFSLOCKCLSTATE(); - clp = VFSTONFS(vp->v_mount)->nm_clp; + clp = nmp->nm_clp; if (clp != NULL) dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); @@ -4500,6 +4520,12 @@ nfscl_nodeleg(vnode_t vp, int writedeleg) nmp = VFSTONFS(vp->v_mount); if (!NFSHASNFSV4(nmp)) return (1); + NFSLOCKMNT(nmp); + if ((nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0) { + NFSUNLOCKMNT(nmp); + return (1); + } + NFSUNLOCKMNT(nmp); NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); if (clp == NULL) { @@ -4856,6 +4882,12 @@ nfscl_delegmodtime(vnode_t vp) nmp = VFSTONFS(vp->v_mount); if (!NFSHASNFSV4(nmp)) return; + NFSLOCKMNT(nmp); + if ((nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0) { + NFSUNLOCKMNT(nmp); + return; + } + NFSUNLOCKMNT(nmp); NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); if (clp == NULL) { @@ -4885,6 +4917,12 @@ nfscl_deleggetmodtime(vnode_t vp, struct timespec *mtime) nmp = VFSTONFS(vp->v_mount); if (!NFSHASNFSV4(nmp)) return; + NFSLOCKMNT(nmp); + if ((nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0) { + NFSUNLOCKMNT(nmp); + return; + } + NFSUNLOCKMNT(nmp); NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); if (clp == NULL) { diff --git a/sys/fs/nfsclient/nfsmount.h b/sys/fs/nfsclient/nfsmount.h index 57adcd8f2fca..f8ea8c9a1418 100644 --- a/sys/fs/nfsclient/nfsmount.h +++ b/sys/fs/nfsclient/nfsmount.h @@ -115,6 +115,7 @@ struct nfsmount { #define NFSMNTP_NOXATTR 0x00000080 #define NFSMNTP_NOADVISE 0x00000100 #define NFSMNTP_NOALLOCATE 0x00000200 +#define NFSMNTP_DELEGISSUED 0x00000400 /* New mount flags only used by the kernel via nmount(2). */ #define NFSMNT_TLS 0x00000001 From owner-dev-commits-src-main@freebsd.org Wed Jun 9 17:52:24 2021 Return-Path: Delivered-To: dev-commits-src-main@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 6DB02651581; Wed, 9 Jun 2021 17:52:24 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 4G0ZSR2jzTz3Dtr; Wed, 9 Jun 2021 17:52:23 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-io1-xd2f.google.com with SMTP id b25so23684339iot.5; Wed, 09 Jun 2021 10:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Ap6wqQFQS8zYmq3KpW/N+I98IUd/mBulNO6B13rH5Ks=; b=uJ8Qz9rptWczpYIn73q5kmBWvRTx3oSROk/n2j6WFHZRY2v0K7CzK/XHRNECmu7XTQ hlDqpeU0e8SFmZAzTp+KlWd3CT/uslB26EC8JaG2oTTU0uR8mWMhb6GAigJM0rMMaqqJ cxXkonvQt19FNKvLrPfzGycLASqvyJan7j6saU71x5jk28LNHfyim+zlLDOA/jzKTm19 GMLO4ri5/TdhO3qm5Sn5vRgpu6Ba7PY7By5gq5/AmU+Lql6t7HvLRCTCQiWAm6BKo7wU CtW2QMfV8dIh5m7+rPcsrbrYEtLti0V0cCQloLBNXLmfenbpOaJeiVp15GRyu+pBgXnK wKWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Ap6wqQFQS8zYmq3KpW/N+I98IUd/mBulNO6B13rH5Ks=; b=MlnROE2RadofsI6SEy/3ARClEDF/iVXVbIdbkh1AdE2zzOaILLvOCJaP7sZ8DOJDJI hshDLOmXUG6nD0YjHNV4mj61Z7Psgv157fY/LiOuQKIEO0E8PUiF5eup9QjrphzM8ksF gCVYpwF796t63tonYGm+TmKiZSEi/Y72n3tLSigbIqgNJkj5wey17gqgV0peGZG5iucT IS45x1JIwP5r+o9RfSvjERXUz7wGDmI1Qzupbr3zU55Q3czPzZaGjHpzuX2nfnoQ1TxW Wno65zT38mJe4t/HrWMs68h6S5DB1sLxV81WEnbGEYAQ/5fWo3pXaHVlK4XZU4zWS4E6 D8kg== X-Gm-Message-State: AOAM530pAhQ2mgE+B1HxZu2aXJhhIIY2XBf+WnEm+nU3TE0inSBGA3rH 1fO4NE6Y85htMlguXhH6ZhcVLooR0l8= X-Google-Smtp-Source: ABdhPJyyJII+tPLJlWcoHsi/+wnC7MZmhCxKpaP9M9m1uHAqlcvUJ7NIM5QlXt4GOFH1V3eK80eE2A== X-Received: by 2002:a6b:6410:: with SMTP id t16mr516601iog.78.1623261141921; Wed, 09 Jun 2021 10:52:21 -0700 (PDT) Received: from smtpclient.apple ([135.129.115.77]) by smtp.gmail.com with ESMTPSA id z16sm375336ilp.73.2021.06.09.10.52.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jun 2021 10:52:21 -0700 (PDT) Sender: David Bright From: David Bright X-Google-Original-From: David Bright Message-Id: <6E4EA1A3-BEEB-4D7B-BB21-EAB13A07A9C2@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: git: 2f176a2b2010 - main - pciconf: Fix up pciconf -lc output Date: Wed, 9 Jun 2021 12:52:18 -0500 In-Reply-To: <93b7adea-1980-b097-cdf1-d3426dd0d531@FreeBSD.org> Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: John Baldwin References: <202106011556.151Fu6ZE084734@gitrepo.freebsd.org> <93b7adea-1980-b097-cdf1-d3426dd0d531@FreeBSD.org> X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Rspamd-Queue-Id: 4G0ZSR2jzTz3Dtr X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=uJ8Qz9rp; dmarc=none; spf=pass (mx1.freebsd.org: domain of dab0816@gmail.com designates 2607:f8b0:4864:20::d2f as permitted sender) smtp.mailfrom=dab0816@gmail.com X-Spamd-Result: default: False [0.30 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[david@bright-family.net,dab0816@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[135.129.115.77:received]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[david@bright-family.net,dab0816@gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::d2f:from]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bright-family.net]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::d2f:from:127.0.2.255]; MID_RHS_MATCH_TO(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2f:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 17:52:24 -0000 On Jun 1, 2021, at 12:44 PM, John Baldwin wrote: >=20 > On 6/1/21 8:56 AM, David Bright wrote: >> The branch main has been updated by dab: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2f176a2b20107f7a9132242223e9eef6= 57400514 >> commit 2f176a2b20107f7a9132242223e9eef657400514 >>=20 >> pciconf: Fix up pciconf -lc output >> The pciconf command fails to emit newlines when particular = ecap field >> values are seen. Fix them up. This has been seen on several = systems at >> $JOB. The documentation for PCI capabilities says that capability >> type 0 should not be used once the spec for PCI capabilities was >> published, but that seems more wishful-thinking than reality. = pciconf >> also chooses not to print fields related to field values that are >> zero, but it seems several of these fields are zero on actual >> hardware. >>=20 >=20 > Are the ecap registers actually valid for version 1 in this case? = That is, > should we treat version 0 as being version 1? The current checks are = just > defensive coding for not parsing something unless we know it is valid. > If the only version 0 caps in practice are always compatible with = version 1 > we could just treat 0 as if it were 1. I think the answer is =E2=80=9Cmaybe, but we don=E2=80=99t know for = sure=E2=80=9D. Robert Herndon did some looking at this; his findings are = paraphrased below: ----- Searching on version fields in PCI caps and ecaps doesn=E2=80=99t = produce a lot of information. There are references to particular devices = indicating that =E2=80=98version=E2=80=99 should be =E2=80=981=E2=80=99, = or that it should not be =E2=80=980=E2=80=99, but there=E2=80=99s = nothing that says so for any generic case, or in the standards I=E2=80=99v= e found. The version field is only four bits, so it seems a little odd = that zero wouldn=E2=80=99t be a reasonable-ish value. Internally we have = only found two hosts exhibiting this issue and both exhibit the same = behavior. When the early return on version 0 is disabled they show = multiple instances of: cap 10[40] =3D PCI-Express 2 root endpoint max data 128(128) ecap 000b[100] =3D Vendor 0 ID 1 none114@pci0:93:15:0: class=3D0x110100 card=3D0x00008086 = chip=3D0x20588086 rev=3D0x07 hdr=3D0x00 So they appear to be mainstream vendor (Intel) devices. All instances = showed =E2=80=98Vendor 0 ID 1=E2=80=99. In this particular instance, the = current FreeBSD code would print this much information and a little more = before refusing to dump more detailed information, printing printf("Vendor [%d] ID %04x Rev %d Length %d\n", ver, PCIR_VSEC_ID(hdr), PCIR_VSEC_REV(hdr), len); before returning. (After the return, it does read more registers out of = the capability, and prints more detailed information for extra registers = as found). It=E2=80=99s conceivable that reading these registers when a particular = field is zero could cause it to print erroneous or misleading = information, but there is a reasonable probability that it would be = helpful in real usage.=20 ----- --=20 David Bright dab@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Wed Jun 9 18:00:55 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2FF3A65179F; Wed, 9 Jun 2021 18:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0ZfH0kc5z3FLK; Wed, 9 Jun 2021 18:00:55 +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 0096620AAA; Wed, 9 Jun 2021 18:00:55 +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 159I0shL085567; Wed, 9 Jun 2021 18:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159I0sdJ085566; Wed, 9 Jun 2021 18:00:54 GMT (envelope-from git) Date: Wed, 9 Jun 2021 18:00:54 GMT Message-Id: <202106091800.159I0sdJ085566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: b45daaea95ab - main - tcp: LRO timestamps have lost their previous precision MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b45daaea95abd8bda52caaacf120f9197caab3e7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 18:00:55 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=b45daaea95abd8bda52caaacf120f9197caab3e7 commit b45daaea95abd8bda52caaacf120f9197caab3e7 Author: Randall Stewart AuthorDate: 2021-06-09 17:58:54 +0000 Commit: Randall Stewart CommitDate: 2021-06-09 17:58:54 +0000 tcp: LRO timestamps have lost their previous precision Recently we had a rewrite to tcp_lro.c that was tested but one subtle change was the move to a less precise timestamp. This causes all kinds of chaos in tcp's that do pacing and needs to be fixed to use the more precise time that was there before. Reviewed by: mtuexen, gallatin, hselasky Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D30695 --- sys/netinet/tcp_lro.c | 23 +++++++++++++---------- sys/netinet/tcp_lro.h | 4 ++-- sys/sys/time.h | 11 +++++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 09fc024c3d73..ea84ca191eca 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -562,16 +562,18 @@ void tcp_lro_flush_inactive(struct lro_ctrl *lc, const struct timeval *timeout) { struct lro_entry *le, *le_tmp; - sbintime_t sbt; + uint64_t now, tov; + struct bintime bt; if (LIST_EMPTY(&lc->lro_active)) return; - /* get timeout time */ - sbt = getsbinuptime() - tvtosbt(*timeout); - + /* get timeout time and current time in ns */ + binuptime(&bt); + now = bintime2ns(&bt); + tov = ((timeout->tv_sec * 1000000000) + (timeout->tv_usec * 1000)); LIST_FOREACH_SAFE(le, &lc->lro_active, next, le_tmp) { - if (sbt >= le->alloc_time) { + if (now >= (bintime2ns(&le->alloc_time) + tov)) { tcp_lro_active_remove(le); tcp_lro_flush(lc, le); } @@ -610,7 +612,7 @@ tcp_lro_log(struct tcpcb *tp, const struct lro_ctrl *lc, { if (tp->t_logstate != TCP_LOG_STATE_OFF) { union tcp_log_stackspecific log; - struct timeval tv; + struct timeval tv, btv; uint32_t cts; cts = tcp_get_usecs(&tv); @@ -637,7 +639,8 @@ tcp_lro_log(struct tcpcb *tp, const struct lro_ctrl *lc, log.u_bbr.cwnd_gain = le->window; log.u_bbr.cur_del_rate = (uintptr_t)m; log.u_bbr.bw_inuse = (uintptr_t)le->m_head; - log.u_bbr.flex6 = sbttous(lc->lro_last_queue_time); + bintime2timeval(&lc->lro_last_queue_time, &btv); + log.u_bbr.flex6 = tcp_tv_to_usectick(&btv); log.u_bbr.flex7 = le->compressed; log.u_bbr.pacing_gain = le->uncompressed; if (in_epoch(net_epoch_preempt)) @@ -1446,7 +1449,7 @@ tcp_lro_flush_all(struct lro_ctrl *lc) CURVNET_SET(lc->ifp->if_vnet); /* get current time */ - lc->lro_last_queue_time = getsbinuptime(); + binuptime(&lc->lro_last_queue_time); /* sort all mbufs according to stream */ tcp_lro_sort(lc->lro_mbuf_data, lc->lro_mbuf_count); @@ -1739,7 +1742,7 @@ tcp_lro_rx_common(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, bool use_h #endif /* If no hardware or arrival stamp on the packet add timestamp */ if ((m->m_flags & (M_TSTMP_LRO | M_TSTMP)) == 0) { - m->m_pkthdr.rcv_tstmp = sbttons(lc->lro_last_queue_time); + m->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); m->m_flags |= M_TSTMP_LRO; } @@ -1834,7 +1837,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum) int error; /* get current time */ - lc->lro_last_queue_time = getsbinuptime(); + binuptime(&lc->lro_last_queue_time); CURVNET_SET(lc->ifp->if_vnet); error = tcp_lro_rx_common(lc, m, csum, true); diff --git a/sys/netinet/tcp_lro.h b/sys/netinet/tcp_lro.h index d2220a626b81..5ff15e2dc97e 100644 --- a/sys/netinet/tcp_lro.h +++ b/sys/netinet/tcp_lro.h @@ -140,7 +140,7 @@ struct lro_entry { uint16_t uncompressed; uint16_t window; uint16_t timestamp; /* flag, not a TCP hdr field. */ - sbintime_t alloc_time; /* time when entry was allocated */ + struct bintime alloc_time; /* time when entry was allocated */ }; LIST_HEAD(lro_head, lro_entry); @@ -154,7 +154,7 @@ struct lro_mbuf_sort { struct lro_ctrl { struct ifnet *ifp; struct lro_mbuf_sort *lro_mbuf_data; - sbintime_t lro_last_queue_time; /* last time data was queued */ + struct bintime lro_last_queue_time; /* last time data was queued */ uint64_t lro_queued; uint64_t lro_flushed; uint64_t lro_bad_csum; diff --git a/sys/sys/time.h b/sys/sys/time.h index 9bffca204d56..a48aa3fe5548 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -286,6 +286,17 @@ bintime2timespec(const struct bintime *_bt, struct timespec *_ts) (uint32_t)(_bt->frac >> 32)) >> 32; } +static __inline uint64_t +bintime2ns(const struct bintime *_bt) +{ + uint64_t ret; + + ret = (uint64_t)(_bt->sec) * (uint64_t)1000000000; + ret += (((uint64_t)1000000000 * + (uint32_t)(_bt->frac >> 32)) >> 32); + return (ret); +} + static __inline void timespec2bintime(const struct timespec *_ts, struct bintime *_bt) { From owner-dev-commits-src-main@freebsd.org Wed Jun 9 21:38:52 2021 Return-Path: Delivered-To: dev-commits-src-main@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 101E96541AD; Wed, 9 Jun 2021 21:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0gTl6pZCz3pqN; Wed, 9 Jun 2021 21:38:51 +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 D2C4723994; Wed, 9 Jun 2021 21:38:51 +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 159LcpXc070334; Wed, 9 Jun 2021 21:38:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159LcpCe070333; Wed, 9 Jun 2021 21:38:51 GMT (envelope-from git) Date: Wed, 9 Jun 2021 21:38:51 GMT Message-Id: <202106092138.159LcpCe070333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Gmelin Subject: git: 278e37006673 - main - freebsd-tips: Add fortune on kern.tty_info_kstacks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 278e370066734a06f6b35e585568ac34969b1e84 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 21:38:52 -0000 The branch main has been updated by grembo (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=278e370066734a06f6b35e585568ac34969b1e84 commit 278e370066734a06f6b35e585568ac34969b1e84 Author: Michael Gmelin AuthorDate: 2021-05-21 16:10:26 +0000 Commit: Michael Gmelin CommitDate: 2021-06-09 21:35:38 +0000 freebsd-tips: Add fortune on kern.tty_info_kstacks Add fortune explaining how to use `sysctl kern.tty_info_kstacks' to alter the output of ^T (tty info). Reviewed by: ceri Differential Revision: https://reviews.freebsd.org/D30388 --- usr.bin/fortune/datfiles/freebsd-tips | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index eb7339cec698..cbbaff9eb84f 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -836,3 +836,10 @@ $ cu -s 9600 -l /dev/ttyU0 -- Daniel Ebdrup Jensen % +You can control kernel stack(9) traces on ^T (tty info) by setting +kern.tty_info_kstacks to 0 (off), 1 (on), or 2 (verbose), e.g.: + +# sysctl kern.tty_info_kstacks=2 + + -- Michael Gmelin +% From owner-dev-commits-src-main@freebsd.org Wed Jun 9 21:41:39 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2299F6540E7; Wed, 9 Jun 2021 21:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0gXz0Yv3z3q90; Wed, 9 Jun 2021 21:41: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 EE57D23761; Wed, 9 Jun 2021 21:41:38 +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 159Lfckv083023; Wed, 9 Jun 2021 21:41:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159LfcZ1083022; Wed, 9 Jun 2021 21:41:38 GMT (envelope-from git) Date: Wed, 9 Jun 2021 21:41:38 GMT Message-Id: <202106092141.159LfcZ1083022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: fee0d486ef34 - main - linuxkpi: Add _RET_IP_ macro in kernel.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fee0d486ef34c6bd113ed743e33357ff626f2495 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 21:41:39 -0000 The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fee0d486ef34c6bd113ed743e33357ff626f2495 commit fee0d486ef34c6bd113ed743e33357ff626f2495 Author: Neel Chauhan AuthorDate: 2021-06-09 21:34:58 +0000 Commit: Neel Chauhan CommitDate: 2021-06-09 21:41:44 +0000 linuxkpi: Add _RET_IP_ macro in kernel.h This is needed by the drm-kmod 5.7 update. Approved by: hselasky (src) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30707 --- sys/compat/linuxkpi/common/include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index f34179d9566b..aba5896111f7 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -301,6 +301,8 @@ extern int linuxkpi_debug; #define u64_to_user_ptr(val) ((void *)(uintptr_t)(val)) +#define _RET_IP_ __builtin_return_address(0) + static inline unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) { From owner-dev-commits-src-main@freebsd.org Wed Jun 9 21:41:40 2021 Return-Path: Delivered-To: dev-commits-src-main@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 AB3D76543DD; Wed, 9 Jun 2021 21:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0gY01kyxz3qJF; Wed, 9 Jun 2021 21:41: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 2122B237E0; Wed, 9 Jun 2021 21:41: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 159LfdEB083053; Wed, 9 Jun 2021 21:41:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159LfdWr083052; Wed, 9 Jun 2021 21:41:39 GMT (envelope-from git) Date: Wed, 9 Jun 2021 21:41:39 GMT Message-Id: <202106092141.159LfdWr083052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: 8a1a42b2a7a4 - main - linuxkpi: Add macros for might_lock_nested() and lockdep_(re/un/)pin_lock() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a1a42b2a7a428fb97fda9f19fd0d67a4eec7535 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 21:41:40 -0000 The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8a1a42b2a7a428fb97fda9f19fd0d67a4eec7535 commit 8a1a42b2a7a428fb97fda9f19fd0d67a4eec7535 Author: Neel Chauhan AuthorDate: 2021-06-09 21:38:52 +0000 Commit: Neel Chauhan CommitDate: 2021-06-09 21:41:44 +0000 linuxkpi: Add macros for might_lock_nested() and lockdep_(re/un/)pin_lock() In Linux, these are macros to locks in the kernel for scheduling purposes. But as with other macros in this header, we aren't doing anything with them so we are doing `do {} while (0)` for now. This is needed by the drm-kmod 5.7 update. Approved by: hselasky (src) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30710 --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 5 +++++ sys/sys/param.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index de82d06a419e..d12bd049b820 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -79,6 +79,7 @@ lockdep_is_held(void *__m) #define might_lock(m) do { } while (0) #define might_lock_read(m) do { } while (0) +#define might_lock_nested(m, n) do { } while (0) #define lock_acquire(...) do { } while (0) #define lock_release(...) do { } while (0) @@ -91,4 +92,8 @@ lockdep_is_held(void *__m) #define lock_map_acquire_read(_map) do { } while (0) #define lock_map_release(_map) do { } while (0) +#define lockdep_pin_lock(l) do { } while (0) +#define lockdep_repin_lock(l,c) do { } while (0) +#define lockdep_unpin_lock(l,c) do { } while (0) + #endif /* _LINUX_LOCKDEP_H_ */ diff --git a/sys/sys/param.h b/sys/sys/param.h index d3a6fae783d4..d78612b5ebb9 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400019 +#define __FreeBSD_version 1400020 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-main@freebsd.org Wed Jun 9 23:12:53 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2946A65561A; Wed, 9 Jun 2021 23:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0jZF0YM3z3w4R; Wed, 9 Jun 2021 23:12: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 EF57024C49; Wed, 9 Jun 2021 23:12: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 159NCqMK003253; Wed, 9 Jun 2021 23:12:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 159NCqGc003252; Wed, 9 Jun 2021 23:12:52 GMT (envelope-from git) Date: Wed, 9 Jun 2021 23:12:52 GMT Message-Id: <202106092312.159NCqGc003252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 597cc550e7b9 - main - LinuxKPI: add fault_flag_allow_retry_first MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 597cc550e7b98294617cdd41800e9f132b6bcad9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 23:12:53 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=597cc550e7b98294617cdd41800e9f132b6bcad9 commit 597cc550e7b98294617cdd41800e9f132b6bcad9 Author: Greg V AuthorDate: 2021-06-09 23:09:16 +0000 Commit: Ed Maste CommitDate: 2021-06-09 23:11:41 +0000 LinuxKPI: add fault_flag_allow_retry_first Used by drm 5.7. Reviewed by: bz, hselasky, nc MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30673 --- sys/compat/linuxkpi/common/include/linux/mm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 68a0f34acaf3..74709299ba1a 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -92,6 +92,9 @@ CTASSERT((VM_PROT_ALL & -(1 << 8)) == 0); #define FAULT_FLAG_REMOTE (1 << 7) #define FAULT_FLAG_INSTRUCTION (1 << 8) +#define fault_flag_allow_retry_first(flags) \ + (((flags) & (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_TRIED)) == FAULT_FLAG_ALLOW_RETRY) + typedef int (*pte_fn_t)(linux_pte_t *, pgtable_t, unsigned long addr, void *data); struct vm_area_struct { From owner-dev-commits-src-main@freebsd.org Thu Jun 10 00:11:00 2021 Return-Path: Delivered-To: dev-commits-src-main@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 DD273656385; Thu, 10 Jun 2021 00:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0ksJ5z2xz4TMx; Thu, 10 Jun 2021 00:11: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 B520A255D6; Thu, 10 Jun 2021 00:11: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 15A0B0td080543; Thu, 10 Jun 2021 00:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15A0B0oI080542; Thu, 10 Jun 2021 00:11:00 GMT (envelope-from git) Date: Thu, 10 Jun 2021 00:11:00 GMT Message-Id: <202106100011.15A0B0oI080542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4d987cd137cb2d0d54a3e35d9258ca7c175d291 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 00:11:00 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 Author: Warner Losh AuthorDate: 2021-06-10 00:10:12 +0000 Commit: Warner Losh CommitDate: 2021-06-10 00:10:52 +0000 mk: WITH_FOO=no now generates a warning Many people are used to gnu configure's behavior of changing --with-foo=no to --without-foo. At the same time, several folks have WITH_FOO=no in their config files to enable this ironic form of the option because of an old meme from IRC, a mailing list or the forums (I forget which). Add a warning to allow to alert people w/o breaking POLA. Reviewed by: allanjude, bdrewery, manu MFC After: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30684 --- share/mk/bsd.mkopt.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk index 5a9cf1b2f1be..98d23dd46c2a 100644 --- a/share/mk/bsd.mkopt.mk +++ b/share/mk/bsd.mkopt.mk @@ -36,6 +36,9 @@ # .for var in ${__DEFAULT_YES_OPTIONS} .if !defined(MK_${var}) +.if defined(WITH_${var}) && ${WITH_${var}} == "no" +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" +.endif .if defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= no .else @@ -54,6 +57,9 @@ MK_${var}:= yes # .for var in ${__DEFAULT_NO_OPTIONS} .if !defined(MK_${var}) +.if defined(WITH_${var}) && ${WITH_${var}} == "no" +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" +.endif .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= yes .else From owner-dev-commits-src-main@freebsd.org Thu Jun 10 02:17:30 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D6F7B64045D; Thu, 10 Jun 2021 02:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0ngG5qjYz4jk5; Thu, 10 Jun 2021 02:17: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 AF979271F3; Thu, 10 Jun 2021 02:17: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 15A2HUqN043818; Thu, 10 Jun 2021 02:17:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15A2HUS0043817; Thu, 10 Jun 2021 02:17:30 GMT (envelope-from git) Date: Thu, 10 Jun 2021 02:17:30 GMT Message-Id: <202106100217.15A2HUS0043817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 36435ca5d3fa - main - insetad -> instead MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36435ca5d3faa869c76f488c41daa9d195496f1f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 02:17:30 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=36435ca5d3faa869c76f488c41daa9d195496f1f commit 36435ca5d3faa869c76f488c41daa9d195496f1f Author: Warner Losh AuthorDate: 2021-06-10 02:17:22 +0000 Commit: Warner Losh CommitDate: 2021-06-10 02:17:22 +0000 insetad -> instead --- share/mk/bsd.mkopt.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk index 98d23dd46c2a..794f4108b7d7 100644 --- a/share/mk/bsd.mkopt.mk +++ b/share/mk/bsd.mkopt.mk @@ -37,7 +37,7 @@ .for var in ${__DEFAULT_YES_OPTIONS} .if !defined(MK_${var}) .if defined(WITH_${var}) && ${WITH_${var}} == "no" -.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" +.warning "Use WITHOUT_${var}=1 instead of WITH_${var}=no" .endif .if defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= no @@ -58,7 +58,7 @@ MK_${var}:= yes .for var in ${__DEFAULT_NO_OPTIONS} .if !defined(MK_${var}) .if defined(WITH_${var}) && ${WITH_${var}} == "no" -.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" +.warning "Use WITHOUT_${var}=1 instead of WITH_${var}=no" .endif .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins MK_${var}:= yes From owner-dev-commits-src-main@freebsd.org Thu Jun 10 02:31:13 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2E7A5640A5C; Thu, 10 Jun 2021 02:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0nz50WNyz4kfR; Thu, 10 Jun 2021 02:31:13 +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 EEB8E27903; Thu, 10 Jun 2021 02:31: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 15A2VCxl066249; Thu, 10 Jun 2021 02:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15A2VCsx066248; Thu, 10 Jun 2021 02:31:12 GMT (envelope-from git) Date: Thu, 10 Jun 2021 02:31:12 GMT Message-Id: <202106100231.15A2VCsx066248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 4ab5c88da287 - main - stress2: Exclude new syzkaller tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ab5c88da28780334f48eae56db52d8e77c871cf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 02:31:13 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=4ab5c88da28780334f48eae56db52d8e77c871cf commit 4ab5c88da28780334f48eae56db52d8e77c871cf Author: Peter Holm AuthorDate: 2021-06-10 02:30:12 +0000 Commit: Peter Holm CommitDate: 2021-06-10 02:30:12 +0000 stress2: Exclude new syzkaller tests --- tools/test/stress2/misc/all.exclude | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 4f818b53a976..833e4fb0dbd3 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -64,6 +64,9 @@ syzkaller30.sh May change policy for random threads to to domainset_fixed 20210 syzkaller31.sh panic: Bad tailq NEXT(0xfffffe0079608f00->tqh_last) != NULL 20210322 syzkaller32.sh Fatal trap 18: integer divide fault while in kernel mode 20210322 syzkaller33.sh Fatal trap 18: integer divide fault while in kernel mode 20210418 +syzkaller39.sh WiP 20210607 +syzkaller40.sh WiP 20210607 +syzkaller41.sh WiP 20210607 truss3.sh WiP 20200915 unionfs.sh insmntque: non-locked vp: xx is not exclusive locked... 20130909 unionfs2.sh insmntque: mp-safe fs and non-locked vp is not ... 20111219 From owner-dev-commits-src-main@freebsd.org Thu Jun 10 10:41:46 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D7621647B31; Thu, 10 Jun 2021 10:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G10s65lqMz4RbS; Thu, 10 Jun 2021 10:41:46 +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 A3BC8650C; Thu, 10 Jun 2021 10:41:46 +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 15AAfkt0022065; Thu, 10 Jun 2021 10:41:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15AAfkh7022064; Thu, 10 Jun 2021 10:41:46 GMT (envelope-from git) Date: Thu, 10 Jun 2021 10:41:46 GMT Message-Id: <202106101041.15AAfkh7022064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: aa310ebfba3d - main - libcasper: fix descriptors numbers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa310ebfba3d49a0b6b03a103b969731a8136a73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 10:41:46 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=aa310ebfba3d49a0b6b03a103b969731a8136a73 commit aa310ebfba3d49a0b6b03a103b969731a8136a73 Author: Mariusz Zaborski AuthorDate: 2021-06-09 21:46:51 +0000 Commit: Mariusz Zaborski CommitDate: 2021-06-10 10:41:29 +0000 libcasper: fix descriptors numbers Casper services expect that the first 3 descriptors (stdin/stdout/stderr) will point to /dev/null. Which Casper will ensure later. The Casper services are forked from the original process. If the initial process closes one of those descriptors, Casper may reuse one of them for it on purpose. If this is the case, then renumarate the descriptors used by Casper to higher numbers. This is done already after the fork, so it doesn't break the parent process. PR: 225343 Reported by: Borja Marcos Tested by: jkim@ --- lib/libcasper/libcasper/libcasper_impl.c | 27 +++++++++++++++++++++++++++ lib/libcasper/libcasper/libcasper_impl.h | 1 + lib/libcasper/libcasper/service.c | 23 +++++++++++++---------- lib/libcasper/libcasper/zygote.c | 15 +++++++++------ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper_impl.c b/lib/libcasper/libcasper/libcasper_impl.c index e4411630c8a1..ae28c8769a07 100644 --- a/lib/libcasper/libcasper/libcasper_impl.c +++ b/lib/libcasper/libcasper/libcasper_impl.c @@ -32,8 +32,10 @@ * $FreeBSD$ */ +#include #include #include +#include #include #include "libcasper_impl.h" @@ -44,3 +46,28 @@ fd_is_valid(int fd) return (fcntl(fd, F_GETFL) != -1 || errno != EBADF); } + +void +fd_fix_environment(int *fdp) +{ + int nullfd, nfd; + + if (*fdp > STDERR_FILENO) + return; + + nullfd = open(_PATH_DEVNULL, O_RDWR); + if (nullfd == -1) + errx(1, "Unable to open %s", _PATH_DEVNULL); + + while (*fdp <= STDERR_FILENO) { + nfd = dup(*fdp); + if (nfd == -1) + errx(1, "Unable to secure fd"); + if (dup2(nullfd, *fdp) == -1) + errx(1, "Unable to secure fd"); + *fdp = nfd; + } + + close(nullfd); +} + diff --git a/lib/libcasper/libcasper/libcasper_impl.h b/lib/libcasper/libcasper/libcasper_impl.h index 11e43f083977..24049a0c07c8 100644 --- a/lib/libcasper/libcasper/libcasper_impl.h +++ b/lib/libcasper/libcasper/libcasper_impl.h @@ -44,6 +44,7 @@ struct service; struct service_connection; bool fd_is_valid(int fd); +void fd_fix_environment(int *fdp); /* Private service functions. */ struct service *service_alloc(const char *name, diff --git a/lib/libcasper/libcasper/service.c b/lib/libcasper/libcasper/service.c index 5c1c64d9a9d7..e87d0640347c 100644 --- a/lib/libcasper/libcasper/service.c +++ b/lib/libcasper/libcasper/service.c @@ -386,24 +386,27 @@ stdnull(void) } static void -service_clean(int sock, int procfd, uint64_t flags) +service_clean(int *sockp, int *procfdp, uint64_t flags) { int fd, maxfd, minfd; - assert(sock > STDERR_FILENO); - assert(procfd > STDERR_FILENO); - assert(sock != procfd); + fd_fix_environment(sockp); + fd_fix_environment(procfdp); + + assert(*sockp > STDERR_FILENO); + assert(*procfdp > STDERR_FILENO); + assert(*sockp != *procfdp); if ((flags & CASPER_SERVICE_STDIO) == 0) stdnull(); if ((flags & CASPER_SERVICE_FD) == 0) { - if (procfd > sock) { - maxfd = procfd; - minfd = sock; + if (*procfdp > *sockp) { + maxfd = *procfdp; + minfd = *sockp; } else { - maxfd = sock; - minfd = procfd; + maxfd = *sockp; + minfd = *procfdp; } for (fd = STDERR_FILENO + 1; fd < maxfd; fd++) { @@ -424,7 +427,7 @@ service_start(struct service *service, int sock, int procfd) assert(service != NULL); assert(service->s_magic == SERVICE_MAGIC); setproctitle("%s", service->s_name); - service_clean(sock, procfd, service->s_flags); + service_clean(&sock, &procfd, service->s_flags); if (service_connection_add(service, sock, NULL) == NULL) _exit(1); diff --git a/lib/libcasper/libcasper/zygote.c b/lib/libcasper/libcasper/zygote.c index 2b84bb49a695..5cdd139cc134 100644 --- a/lib/libcasper/libcasper/zygote.c +++ b/lib/libcasper/libcasper/zygote.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libcasper_impl.h" #include "zygote.h" /* Zygote info. */ @@ -104,7 +105,7 @@ zygote_clone_service_execute(int *chanfdp, int *procfdp) * between sandbox and its owner. */ static void -zygote_main(int sock) +zygote_main(int *sockp) { int error, procfd; int chanfd[2]; @@ -113,12 +114,14 @@ zygote_main(int sock) zygote_func_t *func; pid_t pid; - assert(sock > STDERR_FILENO); + fd_fix_environment(sockp); + + assert(*sockp > STDERR_FILENO); setproctitle("zygote"); for (;;) { - nvlin = nvlist_recv(sock, 0); + nvlin = nvlist_recv(*sockp, 0); if (nvlin == NULL) { if (errno == ENOTCONN) { /* Casper exited. */ @@ -157,7 +160,7 @@ zygote_main(int sock) break; case 0: /* Child. */ - close(sock); + close(*sockp); close(chanfd[0]); func(chanfd[1]); /* NOTREACHED */ @@ -179,7 +182,7 @@ send: nvlist_move_descriptor(nvlout, "chanfd", chanfd[0]); nvlist_move_descriptor(nvlout, "procfd", procfd); } - (void)nvlist_send(sock, nvlout); + (void)nvlist_send(*sockp, nvlout); nvlist_destroy(nvlout); } /* NOTREACHED */ @@ -206,7 +209,7 @@ zygote_init(void) case 0: /* Child. */ close(sp[0]); - zygote_main(sp[1]); + zygote_main(&sp[1]); /* NOTREACHED */ abort(); default: From owner-dev-commits-src-main@freebsd.org Thu Jun 10 10:43:53 2021 Return-Path: Delivered-To: dev-commits-src-main@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 53147647D4E; Thu, 10 Jun 2021 10:43:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G10vY18hXz4SBJ; Thu, 10 Jun 2021 10:43:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5F6BD260111; Thu, 10 Jun 2021 12:43:50 +0200 (CEST) Subject: Re: git: aa310ebfba3d - main - libcasper: fix descriptors numbers To: Mariusz Zaborski , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106101041.15AAfkh7022064@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Thu, 10 Jun 2021 12:43:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <202106101041.15AAfkh7022064@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4G10vY18hXz4SBJ 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 10:43:53 -0000 On 6/10/21 12:41 PM, Mariusz Zaborski wrote: > PR: 225343 Wrong PR number?? --HPS From owner-dev-commits-src-main@freebsd.org Thu Jun 10 10:46:55 2021 Return-Path: Delivered-To: dev-commits-src-main@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 02825647E7E; Thu, 10 Jun 2021 10:46:55 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 4G10z26BgTz4SCk; Thu, 10 Jun 2021 10:46:54 +0000 (UTC) (envelope-from oshogbo.vx@gmail.com) Received: by mail-lj1-f175.google.com with SMTP id s22so4208043ljg.5; Thu, 10 Jun 2021 03:46:54 -0700 (PDT) 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=Wetgb/4leZ2q0cCsF6vPE509q5RlLmDKDW9SxUtgvrU=; b=HlZez4GPzKMVn7rFWSw/aZGaBKUdA0V1lKszJHShalwdToeWysbWMEZoW6UsfpNGvv /cvSg2Q8GK9aC8V00fRSpccWw2h6KGNMb1fzF/zvCdKMxRDt3UoF1df8pbaEfcVqpKbi 0rASHOvE3SwR8Y68hA98Pz//YlxND8Q47RYkkgiUoGB8K1AWoNyk4cq14fPbuxU1XVZK p9t1ZOQkAghn+36jsH60URbqQTUFGZo0ZgZyiZuw5jGv4gQNDHir8/ZOMblO7mQKZ0r+ dCc9LpZ3BT/w7RepoDry6rxzxmGjpoxI+f19dBmrghcZbHL/WtO8l2Nfr89eu4jzNv8g XdLg== X-Gm-Message-State: AOAM531gJkMDFxR4p+GQ12tG4WGCdAYVpmBxCkiB1F6zvTvi0Rv7MqJP vZoz2VTZeLHKbyrJ2Gvhov3TkWl3RUzGlz4tqhGzDqDe0hqC6A== X-Google-Smtp-Source: ABdhPJxTnXXtDohgF9xuok2bTEuTGVT+c9elfSi2k9sYEl766Vwc2b3YLKN8GJBRk3lecKm6qqL9jEpDQQyutMDoEGw= X-Received: by 2002:a05:651c:b28:: with SMTP id b40mr1712793ljr.9.1623322013076; Thu, 10 Jun 2021 03:46:53 -0700 (PDT) MIME-Version: 1.0 References: <202106101041.15AAfkh7022064@gitrepo.freebsd.org> In-Reply-To: From: Mariusz Zaborski Date: Thu, 10 Jun 2021 12:46:41 +0200 Message-ID: Subject: Re: git: aa310ebfba3d - main - libcasper: fix descriptors numbers To: Hans Petter Selasky Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4G10z26BgTz4SCk 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)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 10:46:55 -0000 Yes should be. PR: 255339 Thanks for noticing! On Thu, 10 Jun 2021 at 12:44, Hans Petter Selasky wrote: > On 6/10/21 12:41 PM, Mariusz Zaborski wrote: > > PR: 225343 > > Wrong PR number?? > > --HPS > From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:29:58 2021 Return-Path: Delivered-To: dev-commits-src-main@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 E7648649043; Thu, 10 Jun 2021 11:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G11wk5yNXz4Wbf; Thu, 10 Jun 2021 11:29:58 +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 B45606C25; Thu, 10 Jun 2021 11:29:58 +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 15ABTwMO080412; Thu, 10 Jun 2021 11:29:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABTwK3080411; Thu, 10 Jun 2021 11:29:58 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:29:58 GMT Message-Id: <202106101129.15ABTwK3080411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 3c1de151e365 - main - linux(4): Change Linux futex syscall definition to match Linux actual one. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c1de151e365f05809264352b1d57125d792f373 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:29:59 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=3c1de151e365f05809264352b1d57125d792f373 commit 3c1de151e365f05809264352b1d57125d792f373 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:00:00 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:00:00 +0000 linux(4): Change Linux futex syscall definition to match Linux actual one. MFC after: 2 weeks --- sys/amd64/linux/syscalls.master | 8 ++++---- sys/amd64/linux32/syscalls.master | 4 ++-- sys/arm/linux/syscalls.master | 5 +++-- sys/arm64/linux/syscalls.master | 11 ++++++----- sys/i386/linux/syscalls.master | 4 ++-- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 51f9fe00eb7d..0cac26337ef1 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -1214,12 +1214,12 @@ } 202 AUE_NULL STD { int linux_sys_futex( - void *uaddr, + uint32_t *uaddr, l_int op, - l_int val, + uint32_t val, struct l_timespec *timeout, - void *uaddr2, - l_int val3 + uint32_t *uaddr2, + uint32_t val3 ); } 203 AUE_NULL STD { diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 79ee1f30a00d..03523f45ced6 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -1322,8 +1322,8 @@ } 240 AUE_NULL STD { int linux_sys_futex( - void *uaddr, - int op, + uint32_t *uaddr, + l_int op, uint32_t val, struct l_timespec *timeout, uint32_t *uaddr2, diff --git a/sys/arm/linux/syscalls.master b/sys/arm/linux/syscalls.master index d67f9c3b2069..42adc18bbe1e 100644 --- a/sys/arm/linux/syscalls.master +++ b/sys/arm/linux/syscalls.master @@ -1104,8 +1104,9 @@ ); } 240 AUE_NULL STD { - int linux_sys_futex(void *uaddr, - int op, + int linux_sys_futex( + uint32_t *uaddr, + l_int op, uint32_t val, struct l_timespec *timeout, uint32_t *uaddr2, diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 202425581e8e..dcb43553e469 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -596,12 +596,13 @@ int linux_unshare(void); } 98 AUE_NULL STD { - int linux_sys_futex(void *uaddr, - int op, - int val, + int linux_sys_futex( + uint32_t *uaddr, + l_int op, + uint32_t val, struct l_timespec *timeout, - void *uaddr2, - int val3 + uint32_t *uaddr2, + uint32_t val3 ); } 99 AUE_NULL STD { diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index aa6eb7c1c46f..a60129ccdaa9 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1343,8 +1343,8 @@ } 240 AUE_NULL STD { int linux_sys_futex( - void *uaddr, - int op, + uint32_t *uaddr, + l_int op, uint32_t val, struct l_timespec *timeout, uint32_t *uaddr2, From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:30:00 2021 Return-Path: Delivered-To: dev-commits-src-main@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 42379649129; Thu, 10 Jun 2021 11:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G11wl6vX5z4WdV; Thu, 10 Jun 2021 11:29: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 D3AA569D2; Thu, 10 Jun 2021 11:29: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 15ABTx7e080436; Thu, 10 Jun 2021 11:29:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABTxM6080435; Thu, 10 Jun 2021 11:29:59 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:29:59 GMT Message-Id: <202106101129.15ABTxM6080435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: ee64d9820495 - main - linux(4): Regen for futex system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee64d982049544b1e8a77acc01fd230c906fb305 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:30:00 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=ee64d982049544b1e8a77acc01fd230c906fb305 commit ee64d982049544b1e8a77acc01fd230c906fb305 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:16:40 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:16:40 +0000 linux(4): Regen for futex system call. MFC after: 2 weeks --- sys/amd64/linux/linux_proto.h | 8 ++++---- sys/amd64/linux/linux_systrace_args.c | 16 ++++++++-------- sys/amd64/linux32/linux32_proto.h | 4 ++-- sys/amd64/linux32/linux32_systrace_args.c | 8 ++++---- sys/arm/linux/linux_proto.h | 4 ++-- sys/arm/linux/linux_systrace_args.c | 8 ++++---- sys/arm64/linux/linux_proto.h | 10 +++++----- sys/arm64/linux/linux_systrace_args.c | 20 ++++++++++---------- sys/i386/linux/linux_proto.h | 4 ++-- sys/i386/linux/linux_systrace_args.c | 8 ++++---- 10 files changed, 45 insertions(+), 45 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 60e880d891e8..cfd2f0cf2ca7 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -706,12 +706,12 @@ struct linux_time_args { char tm_l_[PADL_(l_time_t *)]; l_time_t * tm; char tm_r_[PADR_(l_time_t *)]; }; struct linux_sys_futex_args { - char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; - char val_l_[PADL_(l_int)]; l_int val; char val_r_[PADR_(l_int)]; + char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; - char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; - char val3_l_[PADL_(l_int)]; l_int val3; char val3_r_[PADR_(l_int)]; + char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; + char val3_l_[PADL_(uint32_t)]; uint32_t val3; char val3_r_[PADR_(uint32_t)]; }; struct linux_sched_setaffinity_args { char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index d1f2f30f60e0..a4c861b789fd 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -1563,12 +1563,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_sys_futex */ case 202: { struct linux_sys_futex_args *p = params; - uarg[0] = (intptr_t)p->uaddr; /* void * */ + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ iarg[1] = p->op; /* l_int */ - iarg[2] = p->val; /* l_int */ + uarg[2] = p->val; /* uint32_t */ uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */ - uarg[4] = (intptr_t)p->uaddr2; /* void * */ - iarg[5] = p->val3; /* l_int */ + uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ + uarg[5] = p->val3; /* uint32_t */ *n_args = 6; break; } @@ -5237,22 +5237,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 202: switch (ndx) { case 0: - p = "userland void *"; + p = "userland uint32_t *"; break; case 1: p = "l_int"; break; case 2: - p = "l_int"; + p = "uint32_t"; break; case 3: p = "userland struct l_timespec *"; break; case 4: - p = "userland void *"; + p = "userland uint32_t *"; break; case 5: - p = "l_int"; + p = "uint32_t"; break; default: break; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index d8ac24f8492b..aa48b0b50b89 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -782,8 +782,8 @@ struct linux_sendfile64_args { char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_args { - char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; - char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 9eb9bfc15390..bd6201cf4469 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -1692,8 +1692,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_sys_futex */ case 240: { struct linux_sys_futex_args *p = params; - uarg[0] = (intptr_t)p->uaddr; /* void * */ - iarg[1] = p->op; /* int */ + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ uarg[2] = p->val; /* uint32_t */ uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */ uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ @@ -5851,10 +5851,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 240: switch (ndx) { case 0: - p = "userland void *"; + p = "userland uint32_t *"; break; case 1: - p = "int"; + p = "l_int"; break; case 2: p = "uint32_t"; diff --git a/sys/arm/linux/linux_proto.h b/sys/arm/linux/linux_proto.h index e458adb30a10..b07dc8290016 100644 --- a/sys/arm/linux/linux_proto.h +++ b/sys/arm/linux/linux_proto.h @@ -648,8 +648,8 @@ struct linux_sendfile64_args { char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_args { - char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; - char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; diff --git a/sys/arm/linux/linux_systrace_args.c b/sys/arm/linux/linux_systrace_args.c index 608d8c1ed238..87608f6992bf 100644 --- a/sys/arm/linux/linux_systrace_args.c +++ b/sys/arm/linux/linux_systrace_args.c @@ -1477,8 +1477,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_sys_futex */ case 240: { struct linux_sys_futex_args *p = params; - uarg[0] = (intptr_t)p->uaddr; /* void * */ - iarg[1] = p->op; /* int */ + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ uarg[2] = p->val; /* uint32_t */ uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */ uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ @@ -4741,10 +4741,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 240: switch (ndx) { case 0: - p = "userland void *"; + p = "userland uint32_t *"; break; case 1: - p = "int"; + p = "l_int"; break; case 2: p = "uint32_t"; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 66d9cad8b442..768a0b8be28f 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -408,12 +408,12 @@ struct linux_unshare_args { register_t dummy; }; struct linux_sys_futex_args { - char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; - char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; - char val_l_[PADL_(int)]; int val; char val_r_[PADR_(int)]; + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; - char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; - char val3_l_[PADL_(int)]; int val3; char val3_r_[PADR_(int)]; + char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; + char val3_l_[PADL_(uint32_t)]; uint32_t val3; char val3_r_[PADR_(uint32_t)]; }; struct linux_set_robust_list_args { char head_l_[PADL_(struct linux_robust_list_head *)]; struct linux_robust_list_head * head; char head_r_[PADR_(struct linux_robust_list_head *)]; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 18b6201516e7..34e6185180f3 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -772,12 +772,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_sys_futex */ case 98: { struct linux_sys_futex_args *p = params; - uarg[0] = (intptr_t)p->uaddr; /* void * */ - iarg[1] = p->op; /* int */ - iarg[2] = p->val; /* int */ + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ + uarg[2] = p->val; /* uint32_t */ uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */ - uarg[4] = (intptr_t)p->uaddr2; /* void * */ - iarg[5] = p->val3; /* int */ + uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ + uarg[5] = p->val3; /* uint32_t */ *n_args = 6; break; } @@ -3635,22 +3635,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 98: switch (ndx) { case 0: - p = "userland void *"; + p = "userland uint32_t *"; break; case 1: - p = "int"; + p = "l_int"; break; case 2: - p = "int"; + p = "uint32_t"; break; case 3: p = "userland struct l_timespec *"; break; case 4: - p = "userland void *"; + p = "userland uint32_t *"; break; case 5: - p = "int"; + p = "uint32_t"; break; default: break; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 1b3512c5b890..a417f7804c3b 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -779,8 +779,8 @@ struct linux_sendfile64_args { char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_args { - char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; - char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index b8e07e3cc985..37dcd1db59d8 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -1731,8 +1731,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* linux_sys_futex */ case 240: { struct linux_sys_futex_args *p = params; - uarg[0] = (intptr_t)p->uaddr; /* void * */ - iarg[1] = p->op; /* int */ + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ uarg[2] = p->val; /* uint32_t */ uarg[3] = (intptr_t)p->timeout; /* struct l_timespec * */ uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ @@ -5939,10 +5939,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 240: switch (ndx) { case 0: - p = "userland void *"; + p = "userland uint32_t *"; break; case 1: - p = "int"; + p = "l_int"; break; case 2: p = "uint32_t"; From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:30:01 2021 Return-Path: Delivered-To: dev-commits-src-main@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 490FB64921F; Thu, 10 Jun 2021 11:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G11wn0qhDz4WhB; Thu, 10 Jun 2021 11:30: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 ECEFD6D90; Thu, 10 Jun 2021 11:30: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 15ABU0bd081407; Thu, 10 Jun 2021 11:30:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABU0SG081396; Thu, 10 Jun 2021 11:30:00 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:30:00 GMT Message-Id: <202106101130.15ABU0SG081396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 25b09d6f398e - main - linux(4): Prevent integer overflow in futex_requeue. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:30:01 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=25b09d6f398ea8a260ee8e2e8209fd76c61e13ee commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee Author: Dmitry Chagin AuthorDate: 2021-06-10 11:23:11 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:23:11 +0000 linux(4): Prevent integer overflow in futex_requeue. To prevent a signed integer overflow in futex_requeue add a sanity check to catch negative values of nrwake or nrrequeue. MFC after: 2 weeks --- sys/compat/linux/linux_futex.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index da1a91916869..11836e93d71c 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -520,7 +520,8 @@ futex_wake(struct futex *f, int n, uint32_t bitset) } static int -futex_requeue(struct futex *f, int n, struct futex *f2, int n2) +futex_requeue(struct futex *f, int nrwake, struct futex *f2, + int nrrequeue) { struct waiting_proc *wp, *wpt; int count = 0; @@ -529,7 +530,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEX_ASSERT_LOCKED(f2); TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) { - if (++count <= n) { + if (++count <= nrwake) { LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p", f->f_uaddr, wp); wp->wp_flags |= FUTEX_WP_REMOVED; @@ -555,7 +556,7 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2) FUTEXES_LOCK; ++f2->f_refcount; FUTEXES_UNLOCK; - if (count - n >= n2) + if (count - nrwake >= nrrequeue) break; } } @@ -657,7 +658,7 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int clockrt, nrwake, op_ret, ret; + int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; @@ -786,6 +787,15 @@ retry0: return (EINVAL); } + nrrequeue = (int)(unsigned long)args->timeout; + nrwake = args->val; + /* + * Sanity check to prevent signed integer overflow, + * see Linux CVE-2018-6927 + */ + if (nrwake < 0 || nrrequeue < 0) + return (EINVAL); + retry1: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) @@ -829,8 +839,7 @@ retry1: return (EAGAIN); } - nrwake = (int)(unsigned long)args->timeout; - td->td_retval[0] = futex_requeue(f, args->val, f2, nrwake); + td->td_retval[0] = futex_requeue(f, nrwake, f2, nrrequeue); futex_put(f2, NULL); futex_put(f, NULL); break; From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:30:02 2021 Return-Path: Delivered-To: dev-commits-src-main@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 BCA936493A2; Thu, 10 Jun 2021 11:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G11wp1Fl2z4WMm; Thu, 10 Jun 2021 11:30:02 +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 052AD6B34; Thu, 10 Jun 2021 11:30:02 +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 15ABU1E0082232; Thu, 10 Jun 2021 11:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABU1jg082228; Thu, 10 Jun 2021 11:30:01 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:30:01 GMT Message-Id: <202106101130.15ABU1jg082228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 2e46d0c3d983 - main - linux(4): Implement futex_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e46d0c3d983ccd603b9bcfb318c37404b0dbc7f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:30:03 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=2e46d0c3d983ccd603b9bcfb318c37404b0dbc7f commit 2e46d0c3d983ccd603b9bcfb318c37404b0dbc7f Author: Dmitry Chagin AuthorDate: 2021-06-10 11:27:06 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:27:06 +0000 linux(4): Implement futex_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_dummy_machdep.c | 1 - sys/amd64/linux32/syscalls.master | 9 +- sys/compat/linux/linux_futex.c | 218 ++++++++++++++++++------------ sys/compat/linux/linux_futex.h | 3 + sys/i386/linux/linux_dummy_machdep.c | 1 - sys/i386/linux/syscalls.master | 9 +- 6 files changed, 153 insertions(+), 88 deletions(-) diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index 041156bd514b..bfb4ff71e0b1 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -80,5 +80,4 @@ DUMMY(mq_timedsend_time64); DUMMY(mq_timedreceive_time64); DUMMY(semtimedop_time64); DUMMY(rt_sigtimedwait_time64); -DUMMY(futex_time64); DUMMY(sched_rr_get_interval_time64); diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 03523f45ced6..bf2778bb91fd 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2415,7 +2415,14 @@ int linux_rt_sigtimedwait_time64(void); } 422 AUE_NULL STD { - int linux_futex_time64(void); + int linux_sys_futex_time64( + uint32_t *uaddr, + l_int op, + uint32_t val, + struct l_timespec64 *timeout, + uint32_t *uaddr2, + uint32_t val3 + ); } 423 AUE_NULL STD { int linux_sched_rr_get_interval_time64(void); diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 11836e93d71c..6d4c31a8a6df 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -117,29 +117,29 @@ LIN_SDT_PROBE_DEFINE4(futex, futex_atomic_op, decoded_op, "int", "int", "int", LIN_SDT_PROBE_DEFINE0(futex, futex_atomic_op, missing_access_check); LIN_SDT_PROBE_DEFINE1(futex, futex_atomic_op, unimplemented_op, "int"); LIN_SDT_PROBE_DEFINE1(futex, futex_atomic_op, unimplemented_cmp, "int"); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_clockswitch); -LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, copyin_error, "int"); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, invalid_cmp_requeue_use); -LIN_SDT_PROBE_DEFINE3(futex, linux_sys_futex, debug_wait, "uint32_t *", +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_clockswitch); +LIN_SDT_PROBE_DEFINE1(futex, linux_futex, copyin_error, "int"); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, invalid_cmp_requeue_use); +LIN_SDT_PROBE_DEFINE3(futex, linux_futex, debug_wait, "uint32_t *", "uint32_t", "uint32_t"); -LIN_SDT_PROBE_DEFINE4(futex, linux_sys_futex, debug_wait_value_neq, +LIN_SDT_PROBE_DEFINE4(futex, linux_futex, debug_wait_value_neq, "uint32_t *", "uint32_t", "int", "uint32_t"); -LIN_SDT_PROBE_DEFINE3(futex, linux_sys_futex, debug_wake, "uint32_t *", +LIN_SDT_PROBE_DEFINE3(futex, linux_futex, debug_wake, "uint32_t *", "uint32_t", "uint32_t"); -LIN_SDT_PROBE_DEFINE5(futex, linux_sys_futex, debug_cmp_requeue, "uint32_t *", +LIN_SDT_PROBE_DEFINE5(futex, linux_futex, debug_cmp_requeue, "uint32_t *", "uint32_t", "uint32_t", "uint32_t *", "struct l_timespec *"); -LIN_SDT_PROBE_DEFINE2(futex, linux_sys_futex, debug_cmp_requeue_value_neq, +LIN_SDT_PROBE_DEFINE2(futex, linux_futex, debug_cmp_requeue_value_neq, "uint32_t", "int"); -LIN_SDT_PROBE_DEFINE5(futex, linux_sys_futex, debug_wake_op, "uint32_t *", +LIN_SDT_PROBE_DEFINE5(futex, linux_futex, debug_wake_op, "uint32_t *", "int", "uint32_t", "uint32_t *", "uint32_t"); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unhandled_efault); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_lock_pi); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_unlock_pi); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_trylock_pi); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, deprecated_requeue); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_wait_requeue_pi); -LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_cmp_requeue_pi); -LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, unknown_operation, "int"); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unhandled_efault); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_lock_pi); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_unlock_pi); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_trylock_pi); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, deprecated_requeue); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_wait_requeue_pi); +LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_cmp_requeue_pi); +LIN_SDT_PROBE_DEFINE1(futex, linux_futex, unknown_operation, "int"); LIN_SDT_PROBE_DEFINE0(futex, linux_set_robust_list, size_error); LIN_SDT_PROBE_DEFINE1(futex, linux_get_robust_list, copyout_error, "int"); LIN_SDT_PROBE_DEFINE1(futex, handle_futex_death, copyin_error, "int"); @@ -215,8 +215,6 @@ static int futex_get(uint32_t *, struct waiting_proc **, struct futex **, static int futex_sleep(struct futex *, struct waiting_proc *, struct timespec *); static int futex_wake(struct futex *, int, uint32_t); static int futex_requeue(struct futex *, int, struct futex *, int); -static int futex_copyin_timeout(int, struct l_timespec *, int, - struct timespec *); static int futex_wait(struct futex *, struct waiting_proc *, struct timespec *, uint32_t); static void futex_lock(struct futex *); @@ -227,30 +225,17 @@ static int handle_futex_death(struct linux_emuldata *, uint32_t *, static int fetch_robust_entry(struct linux_robust_list **, struct linux_robust_list **, unsigned int *); -static int -futex_copyin_timeout(int op, struct l_timespec *luts, int clockrt, - struct timespec *ts) -{ - struct l_timespec lts; - struct timespec kts; - int error; - - error = copyin(luts, <s, sizeof(lts)); - if (error) - return (error); +struct linux_futex_args { + uint32_t *uaddr; + int32_t op; + uint32_t val; + struct timespec *ts; + uint32_t *uaddr2; + uint32_t val3; + struct timespec kts; +}; - error = linux_to_native_timespec(ts, <s); - if (error) - return (error); - if (clockrt) { - nanotime(&kts); - timespecsub(ts, &kts, ts); - } else if (op == LINUX_FUTEX_WAIT_BITSET) { - nanouptime(&kts); - timespecsub(ts, &kts, ts); - } - return (error); -} +static int linux_futex(struct thread *, struct linux_futex_args *); static void futex_put(struct futex *f, struct waiting_proc *wp) @@ -430,19 +415,17 @@ futex_unlock(struct futex *f) static int futex_sleep(struct futex *f, struct waiting_proc *wp, struct timespec *ts) { - struct timespec uts; sbintime_t sbt, prec, tmp; time_t over; int error; FUTEX_ASSERT_LOCKED(f); if (ts != NULL) { - uts = *ts; - if (uts.tv_sec > INT32_MAX / 2) { - over = uts.tv_sec - INT32_MAX / 2; - uts.tv_sec -= over; + if (ts->tv_sec > INT32_MAX / 2) { + over = ts->tv_sec - INT32_MAX / 2; + ts->tv_sec -= over; } - tmp = tstosbt(uts); + tmp = tstosbt(*ts); if (TIMESEL(&sbt, tmp)) sbt += tc_tick_sbt; sbt += tmp; @@ -655,14 +638,14 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr) return (ret); } -int -linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) +static int +linux_futex(struct thread *td, struct linux_futex_args *args) { int clockrt, nrwake, nrrequeue, op_ret, ret; struct linux_pemuldata *pem; struct waiting_proc *wp; struct futex *f, *f2; - struct timespec uts, *ts; + struct timespec kts; int error, save; uint32_t flags, val; @@ -682,7 +665,7 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) args->op = args->op & ~LINUX_FUTEX_CLOCK_REALTIME; if (clockrt && args->op != LINUX_FUTEX_WAIT_BITSET && args->op != LINUX_FUTEX_WAIT_REQUEUE_PI) { - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, unimplemented_clockswitch); return (ENOSYS); } @@ -696,22 +679,20 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) /* FALLTHROUGH */ case LINUX_FUTEX_WAIT_BITSET: - LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wait, args->uaddr, + LIN_SDT_PROBE3(futex, linux_futex, debug_wait, args->uaddr, args->val, args->val3); LINUX_CTR3(sys_futex, "WAIT uaddr %p val 0x%x bitset 0x%x", args->uaddr, args->val, args->val3); - if (args->timeout != NULL) { - error = futex_copyin_timeout(args->op, args->timeout, - clockrt, &uts); - if (error) { - LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error, - error); - return (error); + if (args->ts != NULL) { + if (clockrt) { + nanotime(&kts); + timespecsub(args->ts, &kts, args->ts); + } else if (args->op == LINUX_FUTEX_WAIT_BITSET) { + nanouptime(&kts); + timespecsub(args->ts, &kts, args->ts); } - ts = &uts; - } else - ts = NULL; + } retry0: error = futex_get(args->uaddr, &wp, &f, @@ -725,14 +706,14 @@ retry0: error = copyin(args->uaddr, &val, sizeof(val)); if (error == 0) goto retry0; - LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error, + LIN_SDT_PROBE1(futex, linux_futex, copyin_error, error); LINUX_CTR1(sys_futex, "WAIT copyin failed %d", error); return (error); } if (val != args->val) { - LIN_SDT_PROBE4(futex, linux_sys_futex, + LIN_SDT_PROBE4(futex, linux_futex, debug_wait_value_neq, args->uaddr, args->val, val, args->val3); LINUX_CTR3(sys_futex, @@ -742,7 +723,7 @@ retry0: return (EWOULDBLOCK); } - error = futex_wait(f, wp, ts, args->val3); + error = futex_wait(f, wp, args->ts, args->val3); break; case LINUX_FUTEX_WAKE: @@ -750,7 +731,7 @@ retry0: /* FALLTHROUGH */ case LINUX_FUTEX_WAKE_BITSET: - LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wake, args->uaddr, + LIN_SDT_PROBE3(futex, linux_futex, debug_wake, args->uaddr, args->val, args->val3); LINUX_CTR3(sys_futex, "WAKE uaddr %p nrwake 0x%x bitset 0x%x", args->uaddr, args->val, args->val3); @@ -769,25 +750,25 @@ retry0: break; case LINUX_FUTEX_CMP_REQUEUE: - LIN_SDT_PROBE5(futex, linux_sys_futex, debug_cmp_requeue, + LIN_SDT_PROBE5(futex, linux_futex, debug_cmp_requeue, args->uaddr, args->val, args->val3, args->uaddr2, - args->timeout); + args->ts); LINUX_CTR5(sys_futex, "CMP_REQUEUE uaddr %p " "nrwake 0x%x uval 0x%x uaddr2 %p nrequeue 0x%x", args->uaddr, args->val, args->val3, args->uaddr2, - args->timeout); + args->ts); /* * Linux allows this, we would not, it is an incorrect * usage of declared ABI, so return EINVAL. */ if (args->uaddr == args->uaddr2) { - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, invalid_cmp_requeue_use); return (EINVAL); } - nrrequeue = (int)(unsigned long)args->timeout; + nrrequeue = (int)(unsigned long)args->ts; nrwake = args->val; /* * Sanity check to prevent signed integer overflow, @@ -823,14 +804,14 @@ retry1: error = copyin(args->uaddr, &val, sizeof(val)); if (error == 0) goto retry1; - LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error, + LIN_SDT_PROBE1(futex, linux_futex, copyin_error, error); LINUX_CTR1(sys_futex, "CMP_REQUEUE copyin failed %d", error); return (error); } if (val != args->val3) { - LIN_SDT_PROBE2(futex, linux_sys_futex, + LIN_SDT_PROBE2(futex, linux_futex, debug_cmp_requeue_value_neq, args->val, val); LINUX_CTR2(sys_futex, "CMP_REQUEUE val 0x%x != uval 0x%x", args->val, val); @@ -845,12 +826,12 @@ retry1: break; case LINUX_FUTEX_WAKE_OP: - LIN_SDT_PROBE5(futex, linux_sys_futex, debug_wake_op, + LIN_SDT_PROBE5(futex, linux_futex, debug_wake_op, args->uaddr, args->op, args->val, args->uaddr2, args->val3); LINUX_CTR5(sys_futex, "WAKE_OP " "uaddr %p nrwake 0x%x uaddr2 %p op 0x%x nrwake2 0x%x", args->uaddr, args->val, args->uaddr2, args->val3, - args->timeout); + args->ts); if (args->uaddr == args->uaddr2) return (EINVAL); @@ -893,7 +874,7 @@ retry2: if (op_ret > 0) { op_ret = 0; - nrwake = (int)(unsigned long)args->timeout; + nrwake = (int)(unsigned long)args->ts; if (f2 != NULL) op_ret += futex_wake(f2, nrwake, args->val3); @@ -913,7 +894,7 @@ retry2: if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { linux_msg(td, "unsupported FUTEX_LOCK_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, unimplemented_lock_pi); } return (ENOSYS); @@ -924,7 +905,7 @@ retry2: if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { linux_msg(td, "unsupported FUTEX_UNLOCK_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, unimplemented_unlock_pi); } return (ENOSYS); @@ -935,7 +916,7 @@ retry2: if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { linux_msg(td, "unsupported FUTEX_TRYLOCK_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, unimplemented_trylock_pi); } return (ENOSYS); @@ -951,7 +932,7 @@ retry2: if ((pem->flags & LINUX_XDEPR_REQUEUEOP) == 0) { linux_msg(td, "unsupported FUTEX_REQUEUE"); pem->flags |= LINUX_XDEPR_REQUEUEOP; - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, deprecated_requeue); } return (EINVAL); @@ -962,7 +943,7 @@ retry2: if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { linux_msg(td, "unsupported FUTEX_WAIT_REQUEUE_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, unimplemented_wait_requeue_pi); } return (ENOSYS); @@ -973,14 +954,14 @@ retry2: if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) { linux_msg(td, "unsupported FUTEX_CMP_REQUEUE_PI"); pem->flags |= LINUX_XUNSUP_FUTEXPIOP; - LIN_SDT_PROBE0(futex, linux_sys_futex, + LIN_SDT_PROBE0(futex, linux_futex, unimplemented_cmp_requeue_pi); } return (ENOSYS); default: linux_msg(td, "unsupported futex op %d", args->op); - LIN_SDT_PROBE1(futex, linux_sys_futex, unknown_operation, + LIN_SDT_PROBE1(futex, linux_futex, unknown_operation, args->op); return (ENOSYS); } @@ -988,6 +969,75 @@ retry2: return (error); } +int +linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) +{ + struct linux_futex_args fargs = { + .uaddr = args->uaddr, + .op = args->op, + .val = args->val, + .ts = NULL, + .uaddr2 = args->uaddr2, + .val3 = args->val3, + }; + struct l_timespec lts; + int error; + + switch (args->op & LINUX_FUTEX_CMD_MASK) { + case LINUX_FUTEX_WAIT: + case LINUX_FUTEX_WAIT_BITSET: + if (args->timeout != NULL) { + error = copyin(args->timeout, <s, sizeof(lts)); + if (error != 0) + return (error); + error = linux_to_native_timespec(&fargs.kts, <s); + if (error != 0) + return (error); + fargs.ts = &fargs.kts; + } + break; + default: + fargs.ts = PTRIN(args->timeout); + } + return (linux_futex(td, &fargs)); +} + +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) +int +linux_sys_futex_time64(struct thread *td, + struct linux_sys_futex_time64_args *args) +{ + struct linux_futex_args fargs = { + .uaddr = args->uaddr, + .op = args->op, + .val = args->val, + .ts = NULL, + .uaddr2 = args->uaddr2, + .val3 = args->val3, + }; + struct l_timespec64 lts; + int error; + + switch (args->op & LINUX_FUTEX_CMD_MASK) { + case LINUX_FUTEX_WAIT: + case LINUX_FUTEX_WAIT_BITSET: + if (args->timeout != NULL) { + error = copyin(args->timeout, <s, sizeof(lts)); + if (error != 0) + return (error); + error = linux_to_native_timespec64(&fargs.kts, <s); + if (error != 0) + return (error); + fargs.ts = &fargs.kts; + } + break; + default: + fargs.ts = PTRIN(args->timeout); + } + return (linux_futex(td, &fargs)); +} +#endif + int linux_set_robust_list(struct thread *td, struct linux_set_robust_list_args *args) { diff --git a/sys/compat/linux/linux_futex.h b/sys/compat/linux/linux_futex.h index bf546538c981..6ea873d98411 100644 --- a/sys/compat/linux/linux_futex.h +++ b/sys/compat/linux/linux_futex.h @@ -55,6 +55,9 @@ #define LINUX_FUTEX_PRIVATE_FLAG 128 #define LINUX_FUTEX_CLOCK_REALTIME 256 +#define LINUX_FUTEX_CMD_MASK ~(LINUX_FUTEX_PRIVATE_FLAG | \ + LINUX_FUTEX_CLOCK_REALTIME) + #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ #define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */ diff --git a/sys/i386/linux/linux_dummy_machdep.c b/sys/i386/linux/linux_dummy_machdep.c index f679e090c7c1..78503b9453ee 100644 --- a/sys/i386/linux/linux_dummy_machdep.c +++ b/sys/i386/linux/linux_dummy_machdep.c @@ -82,5 +82,4 @@ DUMMY(mq_timedsend_time64); DUMMY(mq_timedreceive_time64); DUMMY(semtimedop_time64); DUMMY(rt_sigtimedwait_time64); -DUMMY(futex_time64); DUMMY(sched_rr_get_interval_time64); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index a60129ccdaa9..d78f000530e3 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2433,7 +2433,14 @@ int linux_rt_sigtimedwait_time64(void); } 422 AUE_NULL STD { - int linux_futex_time64(void); + int linux_sys_futex_time64( + uint32_t *uaddr, + l_int op, + uint32_t val, + struct l_timespec64 *timeout, + uint32_t *uaddr2, + uint32_t val3 + ); } 423 AUE_NULL STD { int linux_sched_rr_get_interval_time64(void); From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:30:03 2021 Return-Path: Delivered-To: dev-commits-src-main@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 6CC5E648D57; Thu, 10 Jun 2021 11:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G11wq1VDgz4Wq2; Thu, 10 Jun 2021 11:30: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 13FFB6BAB; Thu, 10 Jun 2021 11:30: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 15ABU3XZ082446; Thu, 10 Jun 2021 11:30:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABU2JW082440; Thu, 10 Jun 2021 11:30:02 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:30:02 GMT Message-Id: <202106101130.15ABU2JW082440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 985978806e21 - main - linux(4): Regen for futex_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 985978806e21073c5578198fedfdd414290c3e64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:30:03 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=985978806e21073c5578198fedfdd414290c3e64 commit 985978806e21073c5578198fedfdd414290c3e64 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:28:25 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:28:25 +0000 linux(4): Regen for futex_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_proto.h | 13 ++++++---- sys/amd64/linux32/linux32_syscall.h | 2 +- sys/amd64/linux32/linux32_syscalls.c | 2 +- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 40 +++++++++++++++++++++++++++---- sys/i386/linux/linux_proto.h | 13 ++++++---- sys/i386/linux/linux_syscall.h | 2 +- sys/i386/linux/linux_syscalls.c | 2 +- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 40 +++++++++++++++++++++++++++---- 10 files changed, 96 insertions(+), 22 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index aa48b0b50b89..5379aaf9c4f6 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1581,8 +1581,13 @@ struct linux_semtimedop_time64_args { struct linux_rt_sigtimedwait_time64_args { register_t dummy; }; -struct linux_futex_time64_args { - register_t dummy; +struct linux_sys_futex_time64_args { + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; + char val3_l_[PADL_(uint32_t)]; uint32_t val3; char val3_r_[PADR_(uint32_t)]; }; struct linux_sched_rr_get_interval_time64_args { register_t dummy; @@ -1989,7 +1994,7 @@ int linux_mq_timedsend_time64(struct thread *, struct linux_mq_timedsend_time64_ int linux_mq_timedreceive_time64(struct thread *, struct linux_mq_timedreceive_time64_args *); int linux_semtimedop_time64(struct thread *, struct linux_semtimedop_time64_args *); int linux_rt_sigtimedwait_time64(struct thread *, struct linux_rt_sigtimedwait_time64_args *); -int linux_futex_time64(struct thread *, struct linux_futex_time64_args *); +int linux_sys_futex_time64(struct thread *, struct linux_sys_futex_time64_args *); int linux_sched_rr_get_interval_time64(struct thread *, struct linux_sched_rr_get_interval_time64_args *); int linux_pidfd_send_signal(struct thread *, struct linux_pidfd_send_signal_args *); int linux_io_uring_setup(struct thread *, struct linux_io_uring_setup_args *); @@ -2400,7 +2405,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_mq_timedreceive_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_semtimedop_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_rt_sigtimedwait_time64 AUE_NULL -#define LINUX32_SYS_AUE_linux_futex_time64 AUE_NULL +#define LINUX32_SYS_AUE_linux_sys_futex_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_sched_rr_get_interval_time64 AUE_NULL #define LINUX32_SYS_AUE_linux_pidfd_send_signal AUE_NULL #define LINUX32_SYS_AUE_linux_io_uring_setup AUE_NULL diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index e82029ce6705..4c9db70621d3 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -383,7 +383,7 @@ #define LINUX32_SYS_linux_mq_timedreceive_time64 419 #define LINUX32_SYS_linux_semtimedop_time64 420 #define LINUX32_SYS_linux_rt_sigtimedwait_time64 421 -#define LINUX32_SYS_linux_futex_time64 422 +#define LINUX32_SYS_linux_sys_futex_time64 422 #define LINUX32_SYS_linux_sched_rr_get_interval_time64 423 #define LINUX32_SYS_linux_pidfd_send_signal 424 #define LINUX32_SYS_linux_io_uring_setup 425 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index c60e40452d35..b427a94c87a0 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -429,7 +429,7 @@ const char *linux32_syscallnames[] = { "linux_mq_timedreceive_time64", /* 419 = linux_mq_timedreceive_time64 */ "linux_semtimedop_time64", /* 420 = linux_semtimedop_time64 */ "linux_rt_sigtimedwait_time64", /* 421 = linux_rt_sigtimedwait_time64 */ - "linux_futex_time64", /* 422 = linux_futex_time64 */ + "linux_sys_futex_time64", /* 422 = linux_sys_futex_time64 */ "linux_sched_rr_get_interval_time64", /* 423 = linux_sched_rr_get_interval_time64 */ "linux_pidfd_send_signal", /* 424 = linux_pidfd_send_signal */ "linux_io_uring_setup", /* 425 = linux_io_uring_setup */ diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index dd59369c7fe4..f84844d58e20 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -439,7 +439,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedreceive_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_futex_time64 */ + { .sy_narg = AS(linux_sys_futex_time64_args), .sy_call = (sy_call_t *)linux_sys_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_sys_futex_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_sched_rr_get_interval_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index bd6201cf4469..10a400677f07 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3069,9 +3069,16 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: { - *n_args = 0; + struct linux_sys_futex_time64_args *p = params; + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ + uarg[2] = p->val; /* uint32_t */ + uarg[3] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ + uarg[5] = p->val3; /* uint32_t */ + *n_args = 6; break; } /* linux_sched_rr_get_interval_time64 */ @@ -8119,8 +8126,30 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_rt_sigtimedwait_time64 */ case 421: break; - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + switch (ndx) { + case 0: + p = "userland uint32_t *"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "userland struct l_timespec64 *"; + break; + case 4: + p = "userland uint32_t *"; + break; + case 5: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_sched_rr_get_interval_time64 */ case 423: @@ -9886,8 +9915,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sched_rr_get_interval_time64 */ case 423: /* linux_pidfd_send_signal */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index a417f7804c3b..42e8d0a17f85 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1574,8 +1574,13 @@ struct linux_semtimedop_time64_args { struct linux_rt_sigtimedwait_time64_args { register_t dummy; }; -struct linux_futex_time64_args { - register_t dummy; +struct linux_sys_futex_time64_args { + char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char val_l_[PADL_(uint32_t)]; uint32_t val; char val_r_[PADR_(uint32_t)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char uaddr2_l_[PADL_(uint32_t *)]; uint32_t * uaddr2; char uaddr2_r_[PADR_(uint32_t *)]; + char val3_l_[PADL_(uint32_t)]; uint32_t val3; char val3_r_[PADR_(uint32_t)]; }; struct linux_sched_rr_get_interval_time64_args { register_t dummy; @@ -1984,7 +1989,7 @@ int linux_mq_timedsend_time64(struct thread *, struct linux_mq_timedsend_time64_ int linux_mq_timedreceive_time64(struct thread *, struct linux_mq_timedreceive_time64_args *); int linux_semtimedop_time64(struct thread *, struct linux_semtimedop_time64_args *); int linux_rt_sigtimedwait_time64(struct thread *, struct linux_rt_sigtimedwait_time64_args *); -int linux_futex_time64(struct thread *, struct linux_futex_time64_args *); +int linux_sys_futex_time64(struct thread *, struct linux_sys_futex_time64_args *); int linux_sched_rr_get_interval_time64(struct thread *, struct linux_sched_rr_get_interval_time64_args *); int linux_pidfd_send_signal(struct thread *, struct linux_pidfd_send_signal_args *); int linux_io_uring_setup(struct thread *, struct linux_io_uring_setup_args *); @@ -2397,7 +2402,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_mq_timedreceive_time64 AUE_NULL #define LINUX_SYS_AUE_linux_semtimedop_time64 AUE_NULL #define LINUX_SYS_AUE_linux_rt_sigtimedwait_time64 AUE_NULL -#define LINUX_SYS_AUE_linux_futex_time64 AUE_NULL +#define LINUX_SYS_AUE_linux_sys_futex_time64 AUE_NULL #define LINUX_SYS_AUE_linux_sched_rr_get_interval_time64 AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_send_signal AUE_NULL #define LINUX_SYS_AUE_linux_io_uring_setup AUE_NULL diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 49ce9295642b..9488c637fff0 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -390,7 +390,7 @@ #define LINUX_SYS_linux_mq_timedreceive_time64 419 #define LINUX_SYS_linux_semtimedop_time64 420 #define LINUX_SYS_linux_rt_sigtimedwait_time64 421 -#define LINUX_SYS_linux_futex_time64 422 +#define LINUX_SYS_linux_sys_futex_time64 422 #define LINUX_SYS_linux_sched_rr_get_interval_time64 423 #define LINUX_SYS_linux_pidfd_send_signal 424 #define LINUX_SYS_linux_io_uring_setup 425 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index 71a7312aa7ee..748d2eb18fc1 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -429,7 +429,7 @@ const char *linux_syscallnames[] = { "linux_mq_timedreceive_time64", /* 419 = linux_mq_timedreceive_time64 */ "linux_semtimedop_time64", /* 420 = linux_semtimedop_time64 */ "linux_rt_sigtimedwait_time64", /* 421 = linux_rt_sigtimedwait_time64 */ - "linux_futex_time64", /* 422 = linux_futex_time64 */ + "linux_sys_futex_time64", /* 422 = linux_sys_futex_time64 */ "linux_sched_rr_get_interval_time64", /* 423 = linux_sched_rr_get_interval_time64 */ "linux_pidfd_send_signal", /* 424 = linux_pidfd_send_signal */ "linux_io_uring_setup", /* 425 = linux_io_uring_setup */ diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index c905daebd9d6..d5435b99e51b 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -439,7 +439,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedreceive_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_futex_time64 */ + { .sy_narg = AS(linux_sys_futex_time64_args), .sy_call = (sy_call_t *)linux_sys_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_sys_futex_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_sched_rr_get_interval_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_uring_setup, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 425 = linux_io_uring_setup */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 37dcd1db59d8..3355d72448e3 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3108,9 +3108,16 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: { - *n_args = 0; + struct linux_sys_futex_time64_args *p = params; + uarg[0] = (intptr_t)p->uaddr; /* uint32_t * */ + iarg[1] = p->op; /* l_int */ + uarg[2] = p->val; /* uint32_t */ + uarg[3] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + uarg[4] = (intptr_t)p->uaddr2; /* uint32_t * */ + uarg[5] = p->val3; /* uint32_t */ + *n_args = 6; break; } /* linux_sched_rr_get_interval_time64 */ @@ -8196,8 +8203,30 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_rt_sigtimedwait_time64 */ case 421: break; - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + switch (ndx) { + case 0: + p = "userland uint32_t *"; + break; + case 1: + p = "l_int"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "userland struct l_timespec64 *"; + break; + case 4: + p = "userland uint32_t *"; + break; + case 5: + p = "uint32_t"; + break; + default: + break; + }; break; /* linux_sched_rr_get_interval_time64 */ case 423: @@ -9992,8 +10021,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: - /* linux_futex_time64 */ + /* linux_sys_futex_time64 */ case 422: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sched_rr_get_interval_time64 */ case 423: /* linux_pidfd_send_signal */ From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:46:12 2021 Return-Path: Delivered-To: dev-commits-src-main@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 A9E446498B2; Thu, 10 Jun 2021 11:46:12 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12HS2DyGz4XpP; Thu, 10 Jun 2021 11:46:11 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 15ABk3rm019565; Thu, 10 Jun 2021 04:46:03 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 15ABk345019564; Thu, 10 Jun 2021 04:46:03 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202106101146.15ABk345019564@gndrsh.dnsmgr.net> Subject: Re: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning In-Reply-To: <202106100011.15A0B0oI080542@gitrepo.freebsd.org> To: Warner Losh Date: Thu, 10 Jun 2021 04:46:03 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4G12HS2DyGz4XpP 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:46:12 -0000 > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > Author: Warner Losh > AuthorDate: 2021-06-10 00:10:12 +0000 > Commit: Warner Losh > CommitDate: 2021-06-10 00:10:52 +0000 > > mk: WITH_FOO=no now generates a warning First off thank you, this may stop some head scratching! But what about WITHOUT_foo=no the symetrical mistake? I see bdrewey raised this in the review, but it was dismissed using the argument that some languages, spanish specifically, allow double negatives. This is computers engineering, and in that field of science double negatives are clearly defined and understood, so using an argument of a language that simply does not apply to the field, IMHO, is an arguement of low standing. Also I do not believe == is a case insensitive operation so this code fails for NO, No, and nO(sic). Regards, Rod > > Many people are used to gnu configure's behavior of changing > --with-foo=no to --without-foo. At the same time, several folks have > WITH_FOO=no in their config files to enable this ironic form of the > option because of an old meme from IRC, a mailing list or the forums (I > forget which). Add a warning to allow to alert people w/o breaking POLA. > > Reviewed by: allanjude, bdrewery, manu > MFC After: 2 weeks > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D30684 > --- > share/mk/bsd.mkopt.mk | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk > index 5a9cf1b2f1be..98d23dd46c2a 100644 > --- a/share/mk/bsd.mkopt.mk > +++ b/share/mk/bsd.mkopt.mk > @@ -36,6 +36,9 @@ > # > .for var in ${__DEFAULT_YES_OPTIONS} > .if !defined(MK_${var}) > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > +.endif > .if defined(WITHOUT_${var}) # WITHOUT always wins > MK_${var}:= no > .else > @@ -54,6 +57,9 @@ MK_${var}:= yes > # > .for var in ${__DEFAULT_NO_OPTIONS} > .if !defined(MK_${var}) > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > +.endif > .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins > MK_${var}:= yes > .else > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:48:03 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D52166497AC; Thu, 10 Jun 2021 11:48:03 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1:5054:ff:fe7a:a27d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12KZ6lKcz4Xs2; Thu, 10 Jun 2021 11:48:02 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.16.1/8.16.1) with ESMTP id 15ABlt4C002871; Thu, 10 Jun 2021 14:47:55 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.16.1/8.16.1/Submit) id 15ABltX0002870; Thu, 10 Jun 2021 14:47:55 +0300 (MSK) (envelope-from dchagin) Date: Thu, 10 Jun 2021 14:47:55 +0300 From: Dmitry Chagin To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Cc: markj@freebsd.org, philip@freebsd.org Subject: Re: git: 25b09d6f398e - main - linux(4): Prevent integer overflow in futex_requeue. Message-ID: References: <202106101130.15ABU0SG081396@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wbC13Q0zx5eikzrU" Content-Disposition: inline In-Reply-To: <202106101130.15ABU0SG081396@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4G12KZ6lKcz4Xs2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of dchagin@heemeyer.club has no SPF policy when checking 2001:19f0:6400:80a1:5054:ff:fe7a:a27d) smtp.mailfrom=dchagin@heemeyer.club X-Spamd-Result: default: False [-0.00 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[dchagin]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:19f0:6400:80a1:5054:ff:fe7a:a27d:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; SPAMHAUS_ZRD(0.00)[2001:19f0:6400:80a1:5054:ff:fe7a:a27d:from:127.0.2.255]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_SHORT(0.90)[0.899]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[dchagin@freebsd.org,dchagin@heemeyer.club]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:6400::/38, country:US]; FROM_NEQ_ENVFROM(0.00)[dchagin@freebsd.org,dchagin@heemeyer.club]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:48:03 -0000 --wbC13Q0zx5eikzrU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 10, 2021 at 11:30:00AM +0000, Dmitry Chagin wrote: > The branch main has been updated by dchagin: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D25b09d6f398ea8a260ee8e2e82= 09fd76c61e13ee >=20 > commit 25b09d6f398ea8a260ee8e2e8209fd76c61e13ee > Author: Dmitry Chagin > AuthorDate: 2021-06-10 11:23:11 +0000 > Commit: Dmitry Chagin > CommitDate: 2021-06-10 11:23:11 +0000 >=20 > linux(4): Prevent integer overflow in futex_requeue. > =20 > To prevent a signed integer overflow in futex_requeue add a sanity ch= eck > to catch negative values of nrwake or nrrequeue. > =20 > MFC after: 2 weeks > --- we discussed this with secteam@, there will be a EN about it --wbC13Q0zx5eikzrU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQ/P4uHzgmeEDYGasrS3ZNvc4787QUCYMH75wAKCRDS3ZNvc478 7d1iAJ92fUrFjXnxY+l1Ed02aSID9Iez7gCcD0Z99sAKSkrPwZXmrs2TQGqN6YI= =r80A -----END PGP SIGNATURE----- --wbC13Q0zx5eikzrU-- From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:53:24 2021 Return-Path: Delivered-To: dev-commits-src-main@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 08F29649CAE; Thu, 10 Jun 2021 11:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12Rl6v5bz4YGd; Thu, 10 Jun 2021 11:53:23 +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 D57C56E79; Thu, 10 Jun 2021 11:53:23 +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 15ABrNx8018886; Thu, 10 Jun 2021 11:53:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABrNdB018885; Thu, 10 Jun 2021 11:53:23 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:53:23 GMT Message-Id: <202106101153.15ABrNdB018885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: db4a1f331b73 - main - linux(4): Implement rt_sigtimedwait_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db4a1f331b73eb821d5d9c3cbb478ad50223f023 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:53:24 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=db4a1f331b73eb821d5d9c3cbb478ad50223f023 commit db4a1f331b73eb821d5d9c3cbb478ad50223f023 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:51:30 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:51:30 +0000 linux(4): Implement rt_sigtimedwait_time64 system call. It still does not work as intended, awaits D30675. MFC after: 2 weeks --- sys/amd64/linux32/linux32_dummy_machdep.c | 1 - sys/amd64/linux32/syscalls.master | 7 +++- sys/compat/linux/linux_signal.c | 70 +++++++++++++++++++++++-------- sys/i386/linux/linux_dummy_machdep.c | 1 - sys/i386/linux/syscalls.master | 7 +++- 5 files changed, 64 insertions(+), 22 deletions(-) diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index bfb4ff71e0b1..837496641311 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -79,5 +79,4 @@ DUMMY(recvmmsg_time64); DUMMY(mq_timedsend_time64); DUMMY(mq_timedreceive_time64); DUMMY(semtimedop_time64); -DUMMY(rt_sigtimedwait_time64); DUMMY(sched_rr_get_interval_time64); diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index bf2778bb91fd..92c1c0e53cdc 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2412,7 +2412,12 @@ int linux_semtimedop_time64(void); } 421 AUE_NULL STD { - int linux_rt_sigtimedwait_time64(void); + int linux_rt_sigtimedwait_time64( + l_sigset_t *mask, + l_siginfo_t *ptr, + struct l_timespec64 *timeout, + l_size_t sigsetsize + ); } 422 AUE_NULL STD { int linux_sys_futex_time64( diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 5310895cb92c..d0f1bb1c3b32 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -60,6 +60,9 @@ __FBSDID("$FreeBSD$"); static int linux_do_tkill(struct thread *td, struct thread *tdt, ksiginfo_t *ksi); static void sicode_to_lsicode(int si_code, int *lsi_code); +static int linux_common_rt_sigtimedwait(struct thread *, + l_sigset_t *, struct timespec *, l_siginfo_t *, + l_size_t); static void linux_to_bsd_sigaction(l_sigaction_t *lsa, struct sigaction *bsa) @@ -386,29 +389,14 @@ linux_rt_sigpending(struct thread *td, struct linux_rt_sigpending_args *args) return (copyout(&lset, args->set, args->sigsetsize)); } -/* - * MPSAFE - */ int linux_rt_sigtimedwait(struct thread *td, struct linux_rt_sigtimedwait_args *args) { - int error, sig; struct timespec ts, *tsa; struct l_timespec lts; - l_sigset_t lset; - sigset_t bset; - l_siginfo_t lsi; - ksiginfo_t ksi; - - if (args->sigsetsize != sizeof(l_sigset_t)) - return (EINVAL); - - if ((error = copyin(args->mask, &lset, sizeof(lset)))) - return (error); - linux_to_bsd_sigset(&lset, &bset); + int error; - tsa = NULL; if (args->timeout) { if ((error = copyin(args->timeout, <s, sizeof(lts)))) return (error); @@ -419,16 +407,38 @@ linux_rt_sigtimedwait(struct thread *td, } else tsa = NULL; + return (linux_common_rt_sigtimedwait(td, args->mask, tsa, + args->ptr, args->sigsetsize)); +} + +static int +linux_common_rt_sigtimedwait(struct thread *td, l_sigset_t *mask, + struct timespec *tsa, l_siginfo_t *ptr, l_size_t sigsetsize) +{ + int error, sig; + l_sigset_t lset; + sigset_t bset; + l_siginfo_t lsi; + ksiginfo_t ksi; + + if (sigsetsize != sizeof(l_sigset_t)) + return (EINVAL); + + if ((error = copyin(mask, &lset, sizeof(lset)))) + return (error); + linux_to_bsd_sigset(&lset, &bset); + + ksiginfo_init(&ksi); error = kern_sigtimedwait(td, bset, &ksi, tsa); if (error) return (error); sig = bsd_to_linux_signal(ksi.ksi_signo); - if (args->ptr) { + if (ptr) { memset(&lsi, 0, sizeof(lsi)); siginfo_to_lsiginfo(&ksi.ksi_info, &lsi, sig); - error = copyout(&lsi, args->ptr, sizeof(lsi)); + error = copyout(&lsi, ptr, sizeof(lsi)); } if (error == 0) td->td_retval[0] = sig; @@ -436,6 +446,30 @@ linux_rt_sigtimedwait(struct thread *td, return (error); } +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) +int +linux_rt_sigtimedwait_time64(struct thread *td, + struct linux_rt_sigtimedwait_time64_args *args) +{ + struct timespec ts, *tsa; + struct l_timespec64 lts; + int error; + + if (args->timeout) { + if ((error = copyin(args->timeout, <s, sizeof(lts)))) + return (error); + error = linux_to_native_timespec64(&ts, <s); + if (error != 0) + return (error); + tsa = &ts; + } else + tsa = NULL; + + return (linux_common_rt_sigtimedwait(td, args->mask, tsa, + args->ptr, args->sigsetsize)); +} +#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ + int linux_kill(struct thread *td, struct linux_kill_args *args) { diff --git a/sys/i386/linux/linux_dummy_machdep.c b/sys/i386/linux/linux_dummy_machdep.c index 78503b9453ee..a349fab5b637 100644 --- a/sys/i386/linux/linux_dummy_machdep.c +++ b/sys/i386/linux/linux_dummy_machdep.c @@ -81,5 +81,4 @@ DUMMY(recvmmsg_time64); DUMMY(mq_timedsend_time64); DUMMY(mq_timedreceive_time64); DUMMY(semtimedop_time64); -DUMMY(rt_sigtimedwait_time64); DUMMY(sched_rr_get_interval_time64); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index d78f000530e3..c42d9af0058d 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2430,7 +2430,12 @@ int linux_semtimedop_time64(void); } 421 AUE_NULL STD { - int linux_rt_sigtimedwait_time64(void); + int linux_rt_sigtimedwait_time64( + l_sigset_t *mask, + l_siginfo_t *ptr, + struct l_timespec64 *timeout, + l_size_t sigsetsize + ); } 422 AUE_NULL STD { int linux_sys_futex_time64( From owner-dev-commits-src-main@freebsd.org Thu Jun 10 11:53:25 2021 Return-Path: Delivered-To: dev-commits-src-main@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 5D5146498E8; Thu, 10 Jun 2021 11:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12Rn1myFz4YJK; Thu, 10 Jun 2021 11:53: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 131DD6FE2; Thu, 10 Jun 2021 11:53: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 15ABrOfm018910; Thu, 10 Jun 2021 11:53:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ABrOPX018909; Thu, 10 Jun 2021 11:53:24 GMT (envelope-from git) Date: Thu, 10 Jun 2021 11:53:24 GMT Message-Id: <202106101153.15ABrOPX018909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: c00252900060 - main - linux(4): Regen for rt_sigtimedwait_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0025290006044d2dd7e3b1b52c04d796dddc374 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 11:53:25 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c0025290006044d2dd7e3b1b52c04d796dddc374 commit c0025290006044d2dd7e3b1b52c04d796dddc374 Author: Dmitry Chagin AuthorDate: 2021-06-10 11:52:43 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 11:52:43 +0000 linux(4): Regen for rt_sigtimedwait_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_proto.h | 5 ++++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 26 +++++++++++++++++++++++++- sys/i386/linux/linux_proto.h | 5 ++++- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 26 +++++++++++++++++++++++++- 6 files changed, 60 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 5379aaf9c4f6..6d23a13ca4c3 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1579,7 +1579,10 @@ struct linux_semtimedop_time64_args { register_t dummy; }; struct linux_rt_sigtimedwait_time64_args { - register_t dummy; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char ptr_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * ptr; char ptr_r_[PADR_(l_siginfo_t *)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_time64_args { char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index f84844d58e20..d131db0a570c 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -438,7 +438,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedsend_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 418 = linux_mq_timedsend_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedreceive_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ + { .sy_narg = AS(linux_rt_sigtimedwait_time64_args), .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ { .sy_narg = AS(linux_sys_futex_time64_args), .sy_call = (sy_call_t *)linux_sys_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_sys_futex_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_sched_rr_get_interval_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 10a400677f07..e31c309800e5 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3066,7 +3066,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rt_sigtimedwait_time64 */ case 421: { - *n_args = 0; + struct linux_rt_sigtimedwait_time64_args *p = params; + uarg[0] = (intptr_t)p->mask; /* l_sigset_t * */ + uarg[1] = (intptr_t)p->ptr; /* l_siginfo_t * */ + uarg[2] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + iarg[3] = p->sigsetsize; /* l_size_t */ + *n_args = 4; break; } /* linux_sys_futex_time64 */ @@ -8125,6 +8130,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rt_sigtimedwait_time64 */ case 421: + switch (ndx) { + case 0: + p = "userland l_sigset_t *"; + break; + case 1: + p = "userland l_siginfo_t *"; + break; + case 2: + p = "userland struct l_timespec64 *"; + break; + case 3: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_sys_futex_time64 */ case 422: @@ -9915,6 +9936,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_futex_time64 */ case 422: if (ndx == 0 || ndx == 1) diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 42e8d0a17f85..8ba444340fea 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1572,7 +1572,10 @@ struct linux_semtimedop_time64_args { register_t dummy; }; struct linux_rt_sigtimedwait_time64_args { - register_t dummy; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char ptr_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * ptr; char ptr_r_[PADR_(l_siginfo_t *)]; + char timeout_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * timeout; char timeout_r_[PADR_(struct l_timespec64 *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_sys_futex_time64_args { char uaddr_l_[PADL_(uint32_t *)]; uint32_t * uaddr; char uaddr_r_[PADR_(uint32_t *)]; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index d5435b99e51b..722fe27ca8cb 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -438,7 +438,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedsend_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 418 = linux_mq_timedsend_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mq_timedreceive_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 419 = linux_mq_timedreceive_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_semtimedop_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 420 = linux_semtimedop_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ + { .sy_narg = AS(linux_rt_sigtimedwait_time64_args), .sy_call = (sy_call_t *)linux_rt_sigtimedwait_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 421 = linux_rt_sigtimedwait_time64 */ { .sy_narg = AS(linux_sys_futex_time64_args), .sy_call = (sy_call_t *)linux_sys_futex_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 422 = linux_sys_futex_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_sched_rr_get_interval_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 423 = linux_sched_rr_get_interval_time64 */ { .sy_narg = AS(linux_pidfd_send_signal_args), .sy_call = (sy_call_t *)linux_pidfd_send_signal, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 424 = linux_pidfd_send_signal */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 3355d72448e3..7d2189734252 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3105,7 +3105,12 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_rt_sigtimedwait_time64 */ case 421: { - *n_args = 0; + struct linux_rt_sigtimedwait_time64_args *p = params; + uarg[0] = (intptr_t)p->mask; /* l_sigset_t * */ + uarg[1] = (intptr_t)p->ptr; /* l_siginfo_t * */ + uarg[2] = (intptr_t)p->timeout; /* struct l_timespec64 * */ + iarg[3] = p->sigsetsize; /* l_size_t */ + *n_args = 4; break; } /* linux_sys_futex_time64 */ @@ -8202,6 +8207,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_rt_sigtimedwait_time64 */ case 421: + switch (ndx) { + case 0: + p = "userland l_sigset_t *"; + break; + case 1: + p = "userland l_siginfo_t *"; + break; + case 2: + p = "userland struct l_timespec64 *"; + break; + case 3: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_sys_futex_time64 */ case 422: @@ -10021,6 +10042,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 420: /* linux_rt_sigtimedwait_time64 */ case 421: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_sys_futex_time64 */ case 422: if (ndx == 0 || ndx == 1) From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:04:52 2021 Return-Path: Delivered-To: dev-commits-src-main@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 38B1E64A396; Thu, 10 Jun 2021 12:04:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12j019RRz4Z0P; Thu, 10 Jun 2021 12:04: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 104587428; Thu, 10 Jun 2021 12:04: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 15AC4p3Y033440; Thu, 10 Jun 2021 12:04:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15AC4pLP033439; Thu, 10 Jun 2021 12:04:51 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:04:51 GMT Message-Id: <202106101204.15AC4pLP033439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: f6d075ecd769 - main - linux(4): Implement pselect6_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6d075ecd76925cbe56ea528a59bd74e4dd9451e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:04:52 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d075ecd76925cbe56ea528a59bd74e4dd9451e commit f6d075ecd76925cbe56ea528a59bd74e4dd9451e Author: Dmitry Chagin AuthorDate: 2021-06-10 12:03:30 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 12:03:30 +0000 linux(4): Implement pselect6_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_dummy_machdep.c | 1 - sys/amd64/linux32/syscalls.master | 9 ++- sys/compat/linux/linux_misc.c | 96 ++++++++++++++++++++++++------- sys/i386/linux/linux_dummy_machdep.c | 1 - sys/i386/linux/syscalls.master | 9 ++- 5 files changed, 92 insertions(+), 24 deletions(-) diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index 837496641311..81e0ed51ae31 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -72,7 +72,6 @@ DUMMY(timer_gettime64); DUMMY(timer_settime64); DUMMY(timerfd_gettime64); DUMMY(timerfd_settime64); -DUMMY(pselect6_time64); DUMMY(ppoll_time64); DUMMY(io_pgetevents_time64); DUMMY(recvmmsg_time64); diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 92c1c0e53cdc..ef89e331b429 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2390,7 +2390,14 @@ ); } 413 AUE_NULL STD { - int linux_pselect6_time64(void); + int linux_pselect6_time64( + l_int nfds, + l_fd_set *readfds, + l_fd_set *writefds, + l_fd_set *exceptfds, + struct l_timespec64 *tsp, + l_uintptr_t *sig + ); } 414 AUE_NULL STD { int linux_ppoll_time64(void); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index bfa7bb659d5f..78dc37d9a19f 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -138,6 +138,9 @@ static int linux_utimensat_lts64_to_ts(struct l_timespec64 *, #endif static int linux_common_utimensat(struct thread *, int, const char *, struct timespec *, int); +static int linux_common_pselect6(struct thread *, l_int, + l_fd_set *, l_fd_set *, l_fd_set *, + struct timespec *, l_uintptr_t *); int linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args) @@ -2347,19 +2350,50 @@ linux_prlimit64(struct thread *td, struct linux_prlimit64_args *args) int linux_pselect6(struct thread *td, struct linux_pselect6_args *args) +{ + struct l_timespec lts; + struct timespec ts, *tsp; + int error; + + if (args->tsp != NULL) { + error = copyin(args->tsp, <s, sizeof(lts)); + if (error != 0) + return (error); + error = linux_to_native_timespec(&ts, <s); + if (error != 0) + return (error); + tsp = &ts; + } else + tsp = NULL; + + error = linux_common_pselect6(td, args->nfds, args->readfds, + args->writefds, args->exceptfds, tsp, args->sig); + if (error != 0) + return (error); + + if (args->tsp != NULL) { + error = native_to_linux_timespec(<s, tsp); + if (error == 0) + error = copyout(<s, args->tsp, sizeof(lts)); + } + return (error); +} + +static int +linux_common_pselect6(struct thread *td, l_int nfds, l_fd_set *readfds, + l_fd_set *writefds, l_fd_set *exceptfds, struct timespec *tsp, + l_uintptr_t *sig) { struct timeval utv, tv0, tv1, *tvp; struct l_pselect6arg lpse6; - struct l_timespec lts; - struct timespec uts; l_sigset_t l_ss; sigset_t *ssp; sigset_t ss; int error; ssp = NULL; - if (args->sig != NULL) { - error = copyin(args->sig, &lpse6, sizeof(lpse6)); + if (sig != NULL) { + error = copyin(sig, &lpse6, sizeof(lpse6)); if (error != 0) return (error); if (lpse6.ss_len != sizeof(l_ss)) @@ -2372,21 +2406,15 @@ linux_pselect6(struct thread *td, struct linux_pselect6_args *args) linux_to_bsd_sigset(&l_ss, &ss); ssp = &ss; } - } + } else + ssp = NULL; /* * Currently glibc changes nanosecond number to microsecond. * This mean losing precision but for now it is hardly seen. */ - if (args->tsp != NULL) { - error = copyin(args->tsp, <s, sizeof(lts)); - if (error != 0) - return (error); - error = linux_to_native_timespec(&uts, <s); - if (error != 0) - return (error); - - TIMESPEC_TO_TIMEVAL(&utv, &uts); + if (tsp != NULL) { + TIMESPEC_TO_TIMEVAL(&utv, tsp); if (itimerfix(&utv)) return (EINVAL); @@ -2395,10 +2423,10 @@ linux_pselect6(struct thread *td, struct linux_pselect6_args *args) } else tvp = NULL; - error = kern_pselect(td, args->nfds, args->readfds, args->writefds, - args->exceptfds, tvp, ssp, LINUX_NFDBITS); + error = kern_pselect(td, nfds, readfds, writefds, + exceptfds, tvp, ssp, LINUX_NFDBITS); - if (error == 0 && args->tsp != NULL) { + if (error == 0 && tsp != NULL) { if (td->td_retval[0] != 0) { /* * Compute how much time was left of the timeout, @@ -2414,16 +2442,44 @@ linux_pselect6(struct thread *td, struct linux_pselect6_args *args) timevalclear(&utv); } else timevalclear(&utv); + TIMEVAL_TO_TIMESPEC(&utv, tsp); + } + return (error); +} - TIMEVAL_TO_TIMESPEC(&utv, &uts); +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) +int +linux_pselect6_time64(struct thread *td, + struct linux_pselect6_time64_args *args) +{ + struct l_timespec64 lts; + struct timespec ts, *tsp; + int error; - error = native_to_linux_timespec(<s, &uts); + if (args->tsp != NULL) { + error = copyin(args->tsp, <s, sizeof(lts)); + if (error != 0) + return (error); + error = linux_to_native_timespec64(&ts, <s); + if (error != 0) + return (error); + tsp = &ts; + } else + tsp = NULL; + + error = linux_common_pselect6(td, args->nfds, args->readfds, + args->writefds, args->exceptfds, tsp, args->sig); + if (error != 0) + return (error); + + if (args->tsp != NULL) { + error = native_to_linux_timespec64(<s, tsp); if (error == 0) error = copyout(<s, args->tsp, sizeof(lts)); } - return (error); } +#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ int linux_ppoll(struct thread *td, struct linux_ppoll_args *args) diff --git a/sys/i386/linux/linux_dummy_machdep.c b/sys/i386/linux/linux_dummy_machdep.c index a349fab5b637..67c70afa15b3 100644 --- a/sys/i386/linux/linux_dummy_machdep.c +++ b/sys/i386/linux/linux_dummy_machdep.c @@ -74,7 +74,6 @@ DUMMY(timer_gettime64); DUMMY(timer_settime64); DUMMY(timerfd_gettime64); DUMMY(timerfd_settime64); -DUMMY(pselect6_time64); DUMMY(ppoll_time64); DUMMY(io_pgetevents_time64); DUMMY(recvmmsg_time64); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index c42d9af0058d..056ac42eaad7 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2408,7 +2408,14 @@ ); } 413 AUE_NULL STD { - int linux_pselect6_time64(void); + int linux_pselect6_time64( + l_int nfds, + l_fd_set *readfds, + l_fd_set *writefds, + l_fd_set *exceptfds, + struct l_timespec64 *tsp, + l_uintptr_t *sig + ); } 414 AUE_NULL STD { int linux_ppoll_time64(void); From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:04:53 2021 Return-Path: Delivered-To: dev-commits-src-main@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 CCD5764A2EF; Thu, 10 Jun 2021 12:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12j12Vw6z4YdD; Thu, 10 Jun 2021 12:04: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 2EE1C71C2; Thu, 10 Jun 2021 12:04: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 15AC4ri3033470; Thu, 10 Jun 2021 12:04:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15AC4rGf033469; Thu, 10 Jun 2021 12:04:53 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:04:53 GMT Message-Id: <202106101204.15AC4rGf033469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 981a60f112e2 - main - linux(4): Regen for pselect6_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 981a60f112e213e7b8de04bf66588cab5c480b34 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:04:53 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=981a60f112e213e7b8de04bf66588cab5c480b34 commit 981a60f112e213e7b8de04bf66588cab5c480b34 Author: Dmitry Chagin AuthorDate: 2021-06-10 12:04:37 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 12:04:37 +0000 linux(4): Regen for pselect6_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_proto.h | 7 ++++++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 34 ++++++++++++++++++++++++++++++- sys/i386/linux/linux_proto.h | 7 ++++++- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 34 ++++++++++++++++++++++++++++++- 6 files changed, 80 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 6d23a13ca4c3..4897fa3615ea 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1558,7 +1558,12 @@ struct linux_utimensat_time64_args { char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_pselect6_time64_args { - register_t dummy; + char nfds_l_[PADL_(l_int)]; l_int nfds; char nfds_r_[PADR_(l_int)]; + char readfds_l_[PADL_(l_fd_set *)]; l_fd_set * readfds; char readfds_r_[PADR_(l_fd_set *)]; + char writefds_l_[PADL_(l_fd_set *)]; l_fd_set * writefds; char writefds_r_[PADR_(l_fd_set *)]; + char exceptfds_l_[PADL_(l_fd_set *)]; l_fd_set * exceptfds; char exceptfds_r_[PADR_(l_fd_set *)]; + char tsp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tsp; char tsp_r_[PADR_(struct l_timespec64 *)]; + char sig_l_[PADL_(l_uintptr_t *)]; l_uintptr_t * sig; char sig_r_[PADR_(l_uintptr_t *)]; }; struct linux_ppoll_time64_args { register_t dummy; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index d131db0a570c..de14c75605b5 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -430,7 +430,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_timerfd_gettime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 410 = linux_timerfd_gettime64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_timerfd_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 411 = linux_timerfd_settime64 */ { .sy_narg = AS(linux_utimensat_time64_args), .sy_call = (sy_call_t *)linux_utimensat_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 412 = linux_utimensat_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pselect6_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ + { .sy_narg = AS(linux_pselect6_time64_args), .sy_call = (sy_call_t *)linux_pselect6_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index e31c309800e5..2f0683a053ef 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3031,7 +3031,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_pselect6_time64 */ case 413: { - *n_args = 0; + struct linux_pselect6_time64_args *p = params; + iarg[0] = p->nfds; /* l_int */ + uarg[1] = (intptr_t)p->readfds; /* l_fd_set * */ + uarg[2] = (intptr_t)p->writefds; /* l_fd_set * */ + uarg[3] = (intptr_t)p->exceptfds; /* l_fd_set * */ + uarg[4] = (intptr_t)p->tsp; /* struct l_timespec64 * */ + uarg[5] = (intptr_t)p->sig; /* l_uintptr_t * */ + *n_args = 6; break; } /* linux_ppoll_time64 */ @@ -8109,6 +8116,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_pselect6_time64 */ case 413: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland l_fd_set *"; + break; + case 2: + p = "userland l_fd_set *"; + break; + case 3: + p = "userland l_fd_set *"; + break; + case 4: + p = "userland struct l_timespec64 *"; + break; + case 5: + p = "userland l_uintptr_t *"; + break; + default: + break; + }; break; /* linux_ppoll_time64 */ case 414: @@ -9922,6 +9951,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_pselect6_time64 */ case 413: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_ppoll_time64 */ case 414: /* linux_io_pgetevents_time64 */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 8ba444340fea..cc4cd3a2923c 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1551,7 +1551,12 @@ struct linux_utimensat_time64_args { char flags_l_[PADL_(l_int)]; l_int flags; char flags_r_[PADR_(l_int)]; }; struct linux_pselect6_time64_args { - register_t dummy; + char nfds_l_[PADL_(l_int)]; l_int nfds; char nfds_r_[PADR_(l_int)]; + char readfds_l_[PADL_(l_fd_set *)]; l_fd_set * readfds; char readfds_r_[PADR_(l_fd_set *)]; + char writefds_l_[PADL_(l_fd_set *)]; l_fd_set * writefds; char writefds_r_[PADR_(l_fd_set *)]; + char exceptfds_l_[PADL_(l_fd_set *)]; l_fd_set * exceptfds; char exceptfds_r_[PADR_(l_fd_set *)]; + char tsp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tsp; char tsp_r_[PADR_(struct l_timespec64 *)]; + char sig_l_[PADL_(l_uintptr_t *)]; l_uintptr_t * sig; char sig_r_[PADR_(l_uintptr_t *)]; }; struct linux_ppoll_time64_args { register_t dummy; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 722fe27ca8cb..85de46a008b9 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -430,7 +430,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_timerfd_gettime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 410 = linux_timerfd_gettime64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_timerfd_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 411 = linux_timerfd_settime64 */ { .sy_narg = AS(linux_utimensat_time64_args), .sy_call = (sy_call_t *)linux_utimensat_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 412 = linux_utimensat_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pselect6_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ + { .sy_narg = AS(linux_pselect6_time64_args), .sy_call = (sy_call_t *)linux_pselect6_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 7d2189734252..8985a25fa0c3 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3070,7 +3070,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_pselect6_time64 */ case 413: { - *n_args = 0; + struct linux_pselect6_time64_args *p = params; + iarg[0] = p->nfds; /* l_int */ + uarg[1] = (intptr_t)p->readfds; /* l_fd_set * */ + uarg[2] = (intptr_t)p->writefds; /* l_fd_set * */ + uarg[3] = (intptr_t)p->exceptfds; /* l_fd_set * */ + uarg[4] = (intptr_t)p->tsp; /* struct l_timespec64 * */ + uarg[5] = (intptr_t)p->sig; /* l_uintptr_t * */ + *n_args = 6; break; } /* linux_ppoll_time64 */ @@ -8186,6 +8193,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_pselect6_time64 */ case 413: + switch (ndx) { + case 0: + p = "l_int"; + break; + case 1: + p = "userland l_fd_set *"; + break; + case 2: + p = "userland l_fd_set *"; + break; + case 3: + p = "userland l_fd_set *"; + break; + case 4: + p = "userland struct l_timespec64 *"; + break; + case 5: + p = "userland l_uintptr_t *"; + break; + default: + break; + }; break; /* linux_ppoll_time64 */ case 414: @@ -10028,6 +10057,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_pselect6_time64 */ case 413: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_ppoll_time64 */ case 414: /* linux_io_pgetevents_time64 */ From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:13:13 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2FB0D64A70F; Thu, 10 Jun 2021 12:13:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G12td0pwLz4bL9; Thu, 10 Jun 2021 12:13:13 +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 04FFA77D2; Thu, 10 Jun 2021 12:13:13 +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 15ACDC2T046315; Thu, 10 Jun 2021 12:13:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ACDCkv046314; Thu, 10 Jun 2021 12:13:12 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:13:12 GMT Message-Id: <202106101213.15ACDCkv046314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: e884512ad143 - main - Split kern_poll() on two counterparts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e884512ad143952f0dbacad631487ce28363fd08 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:13:13 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e884512ad143952f0dbacad631487ce28363fd08 commit e884512ad143952f0dbacad631487ce28363fd08 Author: Dmitry Chagin AuthorDate: 2021-06-10 12:11:25 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 12:11:25 +0000 Split kern_poll() on two counterparts. The kern_poll_kfds() operates on clear kernel data, kfds points to an array in the kernel, while kern_poll() operates on user supplied pollfd. Move nfds check to kern_poll_maxfds(). No functional changes, it's for future use in the Linux emulation layer. Reviewd by: kib Differential Revision: https://reviews.freebsd.org/D30690 MFC after: 2 weeks --- sys/kern/sys_generic.c | 83 +++++++++++++++++++++++++++++--------------------- sys/sys/syscallsubr.h | 3 ++ 2 files changed, 52 insertions(+), 34 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 6fcdee7a088f..c89a643cfcf9 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1417,12 +1417,13 @@ sys_poll(struct thread *td, struct poll_args *uap) return (kern_poll(td, uap->fds, uap->nfds, tsp, NULL)); } +/* + * kfds points to an array in the kernel. + */ int -kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds, +kern_poll_kfds(struct thread *td, struct pollfd *kfds, u_int nfds, struct timespec *tsp, sigset_t *uset) { - struct pollfd *kfds; - struct pollfd stackfds[32]; sbintime_t sbt, precision, tmp; time_t over; struct timespec ts; @@ -1453,28 +1454,11 @@ kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds, } else sbt = -1; - /* - * This is kinda bogus. We have fd limits, but that is not - * really related to the size of the pollfd array. Make sure - * we let the process use at least FD_SETSIZE entries and at - * least enough for the system-wide limits. We want to be reasonably - * safe, but not overly restrictive. - */ - if (nfds > maxfilesperproc && nfds > FD_SETSIZE) - return (EINVAL); - if (nfds > nitems(stackfds)) - kfds = mallocarray(nfds, sizeof(*kfds), M_TEMP, M_WAITOK); - else - kfds = stackfds; - error = copyin(ufds, kfds, nfds * sizeof(*kfds)); - if (error) - goto done; - if (uset != NULL) { error = kern_sigprocmask(td, SIG_SETMASK, uset, &td->td_oldsigmask, 0); if (error) - goto done; + return (error); td->td_pflags |= TDP_OLDMASK; /* * Make sure that ast() is called on return to @@ -1501,20 +1485,11 @@ kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds, } seltdclear(td); -done: /* poll is not restarted after signals... */ if (error == ERESTART) error = EINTR; if (error == EWOULDBLOCK) error = 0; - if (error == 0) { - error = pollout(td, kfds, ufds, nfds); - if (error) - goto out; - } -out: - if (nfds > nitems(stackfds)) - free(kfds, M_TEMP); return (error); } @@ -1539,12 +1514,52 @@ sys_ppoll(struct thread *td, struct ppoll_args *uap) ssp = &set; } else ssp = NULL; + return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); +} + +/* + * ufds points to an array in user space. + */ +int +kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds, + struct timespec *tsp, sigset_t *set) +{ + struct pollfd *kfds; + struct pollfd stackfds[32]; + int error; + + if (kern_poll_maxfds(nfds)) + return (EINVAL); + if (nfds > nitems(stackfds)) + kfds = mallocarray(nfds, sizeof(*kfds), M_TEMP, M_WAITOK); + else + kfds = stackfds; + error = copyin(ufds, kfds, nfds * sizeof(*kfds)); + if (error != 0) + goto out; + + error = kern_poll_kfds(td, kfds, nfds, tsp, set); + if (error == 0) + error = pollout(td, kfds, ufds, nfds); + +out: + if (nfds > nitems(stackfds)) + free(kfds, M_TEMP); + return (error); +} + +bool +kern_poll_maxfds(u_int nfds) +{ + /* - * fds is still a pointer to user space. kern_poll() will - * take care of copyin that array to the kernel space. + * This is kinda bogus. We have fd limits, but that is not + * really related to the size of the pollfd array. Make sure + * we let the process use at least FD_SETSIZE entries and at + * least enough for the system-wide limits. We want to be reasonably + * safe, but not overly restrictive. */ - - return (kern_poll(td, uap->fds, uap->nfds, tsp, ssp)); + return (nfds > maxfilesperproc && nfds > FD_SETSIZE); } static int diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 471c38ab0e12..eb7b82946988 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -225,6 +225,9 @@ int kern_pipe(struct thread *td, int fildes[2], int flags, struct filecaps *fcaps1, struct filecaps *fcaps2); int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, struct timespec *tsp, sigset_t *uset); +int kern_poll_kfds(struct thread *td, struct pollfd *fds, u_int nfds, + struct timespec *tsp, sigset_t *uset); +bool kern_poll_maxfds(u_int nfds); int kern_posix_error(struct thread *td, int error); int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, int advice); From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:19:36 2021 Return-Path: Delivered-To: dev-commits-src-main@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 E480064A7FD; Thu, 10 Jun 2021 12:19:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G132068Fqz4bZ5; Thu, 10 Jun 2021 12:19: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 B787A71E6; Thu, 10 Jun 2021 12:19: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 15ACJaNV047097; Thu, 10 Jun 2021 12:19:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ACJadH047096; Thu, 10 Jun 2021 12:19:36 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:19:36 GMT Message-Id: <202106101219.15ACJadH047096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: ed61e0ce1d29 - main - linux(4): Implement ppoll_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed61e0ce1d293d659b86e382def05a31ac337e03 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:19:37 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=ed61e0ce1d293d659b86e382def05a31ac337e03 commit ed61e0ce1d293d659b86e382def05a31ac337e03 Author: Dmitry Chagin AuthorDate: 2021-06-10 12:18:46 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 12:18:46 +0000 linux(4): Implement ppoll_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_dummy_machdep.c | 1 - sys/amd64/linux32/syscalls.master | 8 ++- sys/compat/linux/linux_misc.c | 98 +++++++++++++++++++++++-------- sys/i386/linux/linux_dummy_machdep.c | 1 - sys/i386/linux/syscalls.master | 8 ++- 5 files changed, 87 insertions(+), 29 deletions(-) diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index 81e0ed51ae31..fb7c88629af7 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -72,7 +72,6 @@ DUMMY(timer_gettime64); DUMMY(timer_settime64); DUMMY(timerfd_gettime64); DUMMY(timerfd_settime64); -DUMMY(ppoll_time64); DUMMY(io_pgetevents_time64); DUMMY(recvmmsg_time64); DUMMY(mq_timedsend_time64); diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index ef89e331b429..0ca919182998 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2400,7 +2400,13 @@ ); } 414 AUE_NULL STD { - int linux_ppoll_time64(void); + int linux_ppoll_time64( + struct pollfd *fds, + uint32_t nfds, + struct l_timespec *tsp, + l_sigset_t *sset, + l_size_t ssize + ); } 415 AUE_NULL UNIMPL nosys 416 AUE_NULL STD { diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 78dc37d9a19f..53dd27dc23db 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -141,6 +141,9 @@ static int linux_common_utimensat(struct thread *, int, static int linux_common_pselect6(struct thread *, l_int, l_fd_set *, l_fd_set *, l_fd_set *, struct timespec *, l_uintptr_t *); +static int linux_common_ppoll(struct thread *, struct pollfd *, + uint32_t, struct timespec *, l_sigset_t *, + l_size_t); int linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args) @@ -2484,24 +2487,10 @@ linux_pselect6_time64(struct thread *td, int linux_ppoll(struct thread *td, struct linux_ppoll_args *args) { - struct timespec ts0, ts1; - struct l_timespec lts; struct timespec uts, *tsp; - l_sigset_t l_ss; - sigset_t *ssp; - sigset_t ss; + struct l_timespec lts; int error; - if (args->sset != NULL) { - if (args->ssize != sizeof(l_ss)) - return (EINVAL); - error = copyin(args->sset, &l_ss, sizeof(l_ss)); - if (error) - return (error); - linux_to_bsd_sigset(&l_ss, &ss); - ssp = &ss; - } else - ssp = NULL; if (args->tsp != NULL) { error = copyin(args->tsp, <s, sizeof(lts)); if (error) @@ -2509,31 +2498,90 @@ linux_ppoll(struct thread *td, struct linux_ppoll_args *args) error = linux_to_native_timespec(&uts, <s); if (error != 0) return (error); - - nanotime(&ts0); tsp = &uts; } else tsp = NULL; - error = kern_poll(td, args->fds, args->nfds, tsp, ssp); + error = linux_common_ppoll(td, args->fds, args->nfds, tsp, + args->sset, args->ssize); + if (error != 0) + return (error); + if (tsp != NULL) { + error = native_to_linux_timespec(<s, tsp); + if (error == 0) + error = copyout(<s, args->tsp, sizeof(lts)); + } + return (error); +} + +static int +linux_common_ppoll(struct thread *td, struct pollfd *fds, uint32_t nfds, + struct timespec *tsp, l_sigset_t *sset, l_size_t ssize) +{ + struct timespec ts0, ts1; + l_sigset_t l_ss; + sigset_t *ssp; + sigset_t ss; + int error; - if (error == 0 && args->tsp != NULL) { + if (sset != NULL) { + if (ssize != sizeof(l_ss)) + return (EINVAL); + error = copyin(sset, &l_ss, sizeof(l_ss)); + if (error) + return (error); + linux_to_bsd_sigset(&l_ss, &ss); + ssp = &ss; + } else + ssp = NULL; + if (tsp != NULL) + nanotime(&ts0); + + error = kern_poll(td, fds, nfds, tsp, ssp); + + if (error == 0 && tsp != NULL) { if (td->td_retval[0]) { nanotime(&ts1); timespecsub(&ts1, &ts0, &ts1); - timespecsub(&uts, &ts1, &uts); - if (uts.tv_sec < 0) - timespecclear(&uts); + timespecsub(tsp, &ts1, tsp); + if (tsp->tv_sec < 0) + timespecclear(tsp); } else - timespecclear(&uts); + timespecclear(tsp); + } + return (error); +} - error = native_to_linux_timespec(<s, &uts); +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) +int +linux_ppoll_time64(struct thread *td, struct linux_ppoll_time64_args *args) +{ + struct timespec uts, *tsp; + struct l_timespec64 lts; + int error; + + if (args->tsp != NULL) { + error = copyin(args->tsp, <s, sizeof(lts)); + if (error != 0) + return (error); + error = linux_to_native_timespec64(&uts, <s); + if (error != 0) + return (error); + tsp = &uts; + } else + tsp = NULL; + error = linux_common_ppoll(td, args->fds, args->nfds, tsp, + args->sset, args->ssize); + if (error != 0) + return (error); + if (tsp != NULL) { + error = native_to_linux_timespec64(<s, tsp); if (error == 0) error = copyout(<s, args->tsp, sizeof(lts)); } - return (error); } +#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ int linux_sched_rr_get_interval(struct thread *td, diff --git a/sys/i386/linux/linux_dummy_machdep.c b/sys/i386/linux/linux_dummy_machdep.c index 67c70afa15b3..071f5fff6f47 100644 --- a/sys/i386/linux/linux_dummy_machdep.c +++ b/sys/i386/linux/linux_dummy_machdep.c @@ -74,7 +74,6 @@ DUMMY(timer_gettime64); DUMMY(timer_settime64); DUMMY(timerfd_gettime64); DUMMY(timerfd_settime64); -DUMMY(ppoll_time64); DUMMY(io_pgetevents_time64); DUMMY(recvmmsg_time64); DUMMY(mq_timedsend_time64); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 056ac42eaad7..f75b1253bc14 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2418,7 +2418,13 @@ ); } 414 AUE_NULL STD { - int linux_ppoll_time64(void); + int linux_ppoll_time64( + struct pollfd *fds, + uint32_t nfds, + struct l_timespec64 *tsp, + l_sigset_t *sset, + l_size_t ssize + ); } 415 AUE_NULL UNIMPL nosys 416 AUE_NULL STD { From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:19:38 2021 Return-Path: Delivered-To: dev-commits-src-main@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 267D264A9A4; Thu, 10 Jun 2021 12:19:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G132206zXz4bXV; Thu, 10 Jun 2021 12:19:38 +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 D656F7648; Thu, 10 Jun 2021 12:19:37 +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 15ACJbN1047128; Thu, 10 Jun 2021 12:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ACJb4m047127; Thu, 10 Jun 2021 12:19:37 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:19:37 GMT Message-Id: <202106101219.15ACJb4m047127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 89f15b79b187 - main - linux(4): Regen for ppoll_time64 system call. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89f15b79b187a31815b2d65d900e4ba78a9754ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:19:38 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=89f15b79b187a31815b2d65d900e4ba78a9754ef commit 89f15b79b187a31815b2d65d900e4ba78a9754ef Author: Dmitry Chagin AuthorDate: 2021-06-10 12:19:12 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-10 12:19:12 +0000 linux(4): Regen for ppoll_time64 system call. MFC after: 2 weeks --- sys/amd64/linux32/linux32_proto.h | 6 +++++- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 30 +++++++++++++++++++++++++++++- sys/i386/linux/linux_proto.h | 6 +++++- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 30 +++++++++++++++++++++++++++++- 6 files changed, 70 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 4897fa3615ea..8a0950d8c754 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1566,7 +1566,11 @@ struct linux_pselect6_time64_args { char sig_l_[PADL_(l_uintptr_t *)]; l_uintptr_t * sig; char sig_r_[PADR_(l_uintptr_t *)]; }; struct linux_ppoll_time64_args { - register_t dummy; + char fds_l_[PADL_(struct pollfd *)]; struct pollfd * fds; char fds_r_[PADR_(struct pollfd *)]; + char nfds_l_[PADL_(uint32_t)]; uint32_t nfds; char nfds_r_[PADR_(uint32_t)]; + char tsp_l_[PADL_(struct l_timespec *)]; struct l_timespec * tsp; char tsp_r_[PADR_(struct l_timespec *)]; + char sset_l_[PADL_(l_sigset_t *)]; l_sigset_t * sset; char sset_r_[PADR_(l_sigset_t *)]; + char ssize_l_[PADL_(l_size_t)]; l_size_t ssize; char ssize_r_[PADR_(l_size_t)]; }; struct linux_io_pgetevents_time64_args { register_t dummy; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index de14c75605b5..c4d35efaef96 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -431,7 +431,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_timerfd_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 411 = linux_timerfd_settime64 */ { .sy_narg = AS(linux_utimensat_time64_args), .sy_call = (sy_call_t *)linux_utimensat_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 412 = linux_utimensat_time64 */ { .sy_narg = AS(linux_pselect6_time64_args), .sy_call = (sy_call_t *)linux_pselect6_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ + { .sy_narg = AS(linux_ppoll_time64_args), .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_recvmmsg_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 2f0683a053ef..f9a3794c309a 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3043,7 +3043,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_ppoll_time64 */ case 414: { - *n_args = 0; + struct linux_ppoll_time64_args *p = params; + uarg[0] = (intptr_t)p->fds; /* struct pollfd * */ + uarg[1] = p->nfds; /* uint32_t */ + uarg[2] = (intptr_t)p->tsp; /* struct l_timespec * */ + uarg[3] = (intptr_t)p->sset; /* l_sigset_t * */ + iarg[4] = p->ssize; /* l_size_t */ + *n_args = 5; break; } /* linux_io_pgetevents_time64 */ @@ -8141,6 +8147,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ppoll_time64 */ case 414: + switch (ndx) { + case 0: + p = "userland struct pollfd *"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "userland struct l_timespec *"; + break; + case 3: + p = "userland l_sigset_t *"; + break; + case 4: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_io_pgetevents_time64 */ case 416: @@ -9956,6 +9981,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ppoll_time64 */ case 414: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_io_pgetevents_time64 */ case 416: /* linux_recvmmsg_time64 */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index cc4cd3a2923c..0c7bdd56db97 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1559,7 +1559,11 @@ struct linux_pselect6_time64_args { char sig_l_[PADL_(l_uintptr_t *)]; l_uintptr_t * sig; char sig_r_[PADR_(l_uintptr_t *)]; }; struct linux_ppoll_time64_args { - register_t dummy; + char fds_l_[PADL_(struct pollfd *)]; struct pollfd * fds; char fds_r_[PADR_(struct pollfd *)]; + char nfds_l_[PADL_(uint32_t)]; uint32_t nfds; char nfds_r_[PADR_(uint32_t)]; + char tsp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tsp; char tsp_r_[PADR_(struct l_timespec64 *)]; + char sset_l_[PADL_(l_sigset_t *)]; l_sigset_t * sset; char sset_r_[PADR_(l_sigset_t *)]; + char ssize_l_[PADL_(l_size_t)]; l_size_t ssize; char ssize_r_[PADR_(l_size_t)]; }; struct linux_io_pgetevents_time64_args { register_t dummy; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 85de46a008b9..216f46798e3a 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -431,7 +431,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_timerfd_settime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 411 = linux_timerfd_settime64 */ { .sy_narg = AS(linux_utimensat_time64_args), .sy_call = (sy_call_t *)linux_utimensat_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 412 = linux_utimensat_time64 */ { .sy_narg = AS(linux_pselect6_time64_args), .sy_call = (sy_call_t *)linux_pselect6_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 413 = linux_pselect6_time64 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ + { .sy_narg = AS(linux_ppoll_time64_args), .sy_call = (sy_call_t *)linux_ppoll_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 414 = linux_ppoll_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 415 = nosys */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_io_pgetevents_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 416 = linux_io_pgetevents_time64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_recvmmsg_time64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 417 = linux_recvmmsg_time64 */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 8985a25fa0c3..15232a900447 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3082,7 +3082,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_ppoll_time64 */ case 414: { - *n_args = 0; + struct linux_ppoll_time64_args *p = params; + uarg[0] = (intptr_t)p->fds; /* struct pollfd * */ + uarg[1] = p->nfds; /* uint32_t */ + uarg[2] = (intptr_t)p->tsp; /* struct l_timespec64 * */ + uarg[3] = (intptr_t)p->sset; /* l_sigset_t * */ + iarg[4] = p->ssize; /* l_size_t */ + *n_args = 5; break; } /* linux_io_pgetevents_time64 */ @@ -8218,6 +8224,25 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ppoll_time64 */ case 414: + switch (ndx) { + case 0: + p = "userland struct pollfd *"; + break; + case 1: + p = "uint32_t"; + break; + case 2: + p = "userland struct l_timespec64 *"; + break; + case 3: + p = "userland l_sigset_t *"; + break; + case 4: + p = "l_size_t"; + break; + default: + break; + }; break; /* linux_io_pgetevents_time64 */ case 416: @@ -10062,6 +10087,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_ppoll_time64 */ case 414: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_io_pgetevents_time64 */ case 416: /* linux_recvmmsg_time64 */ From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:21:39 2021 Return-Path: Delivered-To: dev-commits-src-main@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 EE48664A779; Thu, 10 Jun 2021 12:21:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G134M6ThTz4bpM; Thu, 10 Jun 2021 12:21: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 C71C97672; Thu, 10 Jun 2021 12:21: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 15ACLd4O058798; Thu, 10 Jun 2021 12:21:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ACLdPd058797; Thu, 10 Jun 2021 12:21:39 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:21:39 GMT Message-Id: <202106101221.15ACLdPd058797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ea21980a3fac - main - pf: use M_WAITOK where possible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea21980a3facfed4c2c6fd10d0f16276564fb540 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:21:40 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ea21980a3facfed4c2c6fd10d0f16276564fb540 commit ea21980a3facfed4c2c6fd10d0f16276564fb540 Author: Kristof Provost AuthorDate: 2021-06-09 12:00:07 +0000 Commit: Kristof Provost CommitDate: 2021-06-10 10:20:10 +0000 pf: use M_WAITOK where possible In the ioctl path use M_WAITOK allocations whereever possible. These are less sensitive to memory pressure, and ioctl requests have no hard deadlines. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30702 --- sys/netpfil/pf/pf_ioctl.c | 78 ++++++++--------------------------------------- 1 file changed, 13 insertions(+), 65 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 766710afd1dd..a5903dc1b4ff 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -3772,11 +3772,7 @@ DIOCCHANGEADDR_error: totlen = io->pfrio_size * sizeof(struct pfr_table); pfrts = mallocarray(io->pfrio_size, sizeof(struct pfr_table), - M_TEMP, M_NOWAIT); - if (pfrts == NULL) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfrts, totlen); if (error) { free(pfrts, M_TEMP); @@ -3861,11 +3857,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (error) { free(pfras, M_TEMP); @@ -3899,11 +3891,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (error) { free(pfras, M_TEMP); @@ -3941,11 +3929,7 @@ DIOCCHANGEADDR_error: } totlen = count * sizeof(struct pfr_addr); pfras = mallocarray(count, sizeof(struct pfr_addr), M_TEMP, - M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (error) { free(pfras, M_TEMP); @@ -3980,11 +3964,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); PF_RULES_RLOCK(); error = pfr_get_addrs(&io->pfrio_table, pfras, &io->pfrio_size, io->pfrio_flags | PFR_FLAG_USERIOCTL); @@ -4012,11 +3992,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_astats); pfrastats = mallocarray(io->pfrio_size, - sizeof(struct pfr_astats), M_TEMP, M_NOWAIT); - if (! pfrastats) { - error = ENOMEM; - break; - } + sizeof(struct pfr_astats), M_TEMP, M_WAITOK); PF_RULES_RLOCK(); error = pfr_get_astats(&io->pfrio_table, pfrastats, &io->pfrio_size, io->pfrio_flags | PFR_FLAG_USERIOCTL); @@ -4044,11 +4020,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (error) { free(pfras, M_TEMP); @@ -4082,11 +4054,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (error) { free(pfras, M_TEMP); @@ -4120,11 +4088,7 @@ DIOCCHANGEADDR_error: } totlen = io->pfrio_size * sizeof(struct pfr_addr); pfras = mallocarray(io->pfrio_size, sizeof(struct pfr_addr), - M_TEMP, M_NOWAIT); - if (! pfras) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->pfrio_buffer, pfras, totlen); if (error) { free(pfras, M_TEMP); @@ -4173,11 +4137,7 @@ DIOCCHANGEADDR_error: } totlen = sizeof(struct pfioc_trans_e) * io->size; ioes = mallocarray(io->size, sizeof(struct pfioc_trans_e), - M_TEMP, M_NOWAIT); - if (! ioes) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->array, ioes, totlen); if (error) { free(ioes, M_TEMP); @@ -4250,11 +4210,7 @@ DIOCCHANGEADDR_error: } totlen = sizeof(struct pfioc_trans_e) * io->size; ioes = mallocarray(io->size, sizeof(struct pfioc_trans_e), - M_TEMP, M_NOWAIT); - if (! ioes) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->array, ioes, totlen); if (error) { free(ioes, M_TEMP); @@ -4329,11 +4285,7 @@ DIOCCHANGEADDR_error: totlen = sizeof(struct pfioc_trans_e) * io->size; ioes = mallocarray(io->size, sizeof(struct pfioc_trans_e), - M_TEMP, M_NOWAIT); - if (ioes == NULL) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); error = copyin(io->array, ioes, totlen); if (error) { free(ioes, M_TEMP); @@ -4536,11 +4488,7 @@ DIOCCHANGEADDR_error: bufsiz = io->pfiio_size * sizeof(struct pfi_kif); ifstore = mallocarray(io->pfiio_size, sizeof(struct pfi_kif), - M_TEMP, M_NOWAIT); - if (ifstore == NULL) { - error = ENOMEM; - break; - } + M_TEMP, M_WAITOK); PF_RULES_RLOCK(); pfi_get_ifaces(io->pfiio_name, ifstore, &io->pfiio_size); From owner-dev-commits-src-main@freebsd.org Thu Jun 10 12:35:42 2021 Return-Path: Delivered-To: dev-commits-src-main@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 0923764B045; Thu, 10 Jun 2021 12:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G13NY6D3zz4f3d; Thu, 10 Jun 2021 12:35:41 +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 BDBA97B42; Thu, 10 Jun 2021 12:35:41 +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 15ACZfJT073587; Thu, 10 Jun 2021 12:35:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ACZfol073586; Thu, 10 Jun 2021 12:35:41 GMT (envelope-from git) Date: Thu, 10 Jun 2021 12:35:41 GMT Message-Id: <202106101235.15ACZfol073586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 67e892819b26 - main - tcp: Mbuf leak while holding a socket buffer lock. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67e892819b26c198e4232c7586ead7f854f848c5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 12:35:42 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=67e892819b26c198e4232c7586ead7f854f848c5 commit 67e892819b26c198e4232c7586ead7f854f848c5 Author: Randall Stewart AuthorDate: 2021-06-10 12:33:57 +0000 Commit: Randall Stewart CommitDate: 2021-06-10 12:33:57 +0000 tcp: Mbuf leak while holding a socket buffer lock. When running at NF the current Rack and BBR changes with the recent commits from Richard that cause the socket buffer lock to be held over the ip_output() call and then finally culminating in a call to tcp_handle_wakeup() we get a lot of leaked mbufs. I don't think that this leak is actually caused by holding the lock or what Richard has done, but is exposing some other bug that has probably been lying dormant for a long time. I will continue to look (using his changes) at what is going on to try to root cause out the issue. In the meantime I can't leave the leaks out for everyone else. So this commit will revert all of Richards changes and move both Rack and BBR back to just doing the old sorwakeup_locked() calls after messing with the so_rcv buffer. We may want to look at adding back in Richards changes after I have pinpointed the root cause of the mbuf leak and fixed it. Reviewed by: mtuexen,rscheff Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D30704 --- sys/netinet/tcp_output.c | 2 ++ sys/netinet/tcp_stacks/bbr.c | 47 +++++++++++++++++------------ sys/netinet/tcp_stacks/rack.c | 69 ++++++++++++++++++++++--------------------- sys/netinet/tcp_var.h | 18 +++++++++++ 4 files changed, 84 insertions(+), 52 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 93c376f81f1a..8d78e639636b 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1559,6 +1559,8 @@ send: #endif /* INET */ out: + if (error == 0) + tcp_account_for_send(tp, len, (tp->snd_nxt != tp->snd_max), 0); /* * In transmit state, time the transmission and arrange for * the retransmit. In persist state, just set snd_max. diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index f6388c39cad3..d5da2d33c18f 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -486,7 +486,7 @@ static void uint32_t line, uint8_t is_start, uint16_t set); static struct bbr_sendmap * - bbr_find_lowest_rsm(struct tcp_bbr *bbr); + bbr_find_lowest_rsm(struct tcp_bbr *bbr); static __inline uint32_t bbr_get_rtt(struct tcp_bbr *bbr, int32_t rtt_type); static void @@ -1620,7 +1620,7 @@ bbr_init_sysctls(void) &bbr_drop_limit, 0, "Number of segments limit for drop (0=use min_cwnd w/flight)?"); - /* Timeout controls */ + /* Timeout controls */ bbr_timeout = SYSCTL_ADD_NODE(&bbr_sysctl_ctx, SYSCTL_CHILDREN(bbr_sysctl_root), OID_AUTO, @@ -5750,7 +5750,7 @@ tcp_bbr_tso_size_check(struct tcp_bbr *bbr, uint32_t cts) * seg = goal_tso / mss * tso = seg * mss * else - * tso = mss + * tso = mss * if (tso > per-tcb-max) * tso = per-tcb-max * else if ( bw > 512Mbps) @@ -6736,7 +6736,7 @@ bbr_update_bbr_info(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t rtt, else bbr->rc_ack_is_cumack = 0; old_rttprop = bbr_get_rtt(bbr, BBR_RTT_PROP); - /* + /* * Note the following code differs to the original * BBR spec. It calls for <= not <. However after a * long discussion in email with Neal, he acknowledged @@ -8306,12 +8306,14 @@ bbr_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, appended = #endif sbappendstream_locked(&so->so_rcv, m, 0); - tp->t_flags |= TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); #ifdef NETFLIX_SB_LIMITS if (so->so_rcv.sb_shlim && appended != mcnt) counter_fo_release(so->so_rcv.sb_shlim, mcnt - appended); #endif + } else { /* * XXX: Due to the header drop above "th" is @@ -8323,6 +8325,11 @@ bbr_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, thflags = tcp_reass(tp, th, &temp, &tlen, m); tp->t_flags |= TF_ACKNOW; + if (tp->t_flags & TF_WAKESOR) { + tp->t_flags &= ~TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); + } } if ((tp->t_flags & TF_SACK_PERMIT) && (save_tlen > 0) && @@ -8357,7 +8364,6 @@ bbr_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, save_start + tlen); } } - tcp_handle_wakeup(tp, so); } else { m_freem(m); thflags &= ~TH_FIN; @@ -9164,7 +9170,11 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, if (tlen == 0 && (thflags & TH_FIN) == 0) { (void)tcp_reass(tp, (struct tcphdr *)0, NULL, 0, (struct mbuf *)0); - tcp_handle_wakeup(tp, so); + if (tp->t_flags & TF_WAKESOR) { + tp->t_flags &= ~TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); + } } tp->snd_wl1 = th->th_seq - 1; if (bbr_process_ack(m, th, so, tp, to, tiwin, tlen, &ourfinisacked, thflags, &ret_val)) { @@ -11565,18 +11575,18 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { retval = 0; m_freem(m); - goto done_with_input; - } - /* - * If a segment with the ACK-bit set arrives in the SYN-SENT state - * check SEQ.ACK first as described on page 66 of RFC 793, section 3.9. - */ - if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && - (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { + goto done_with_input; + } + /* + * If a segment with the ACK-bit set arrives in the SYN-SENT state + * check SEQ.ACK first as described on page 66 of RFC 793, section 3.9. + */ + if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && + (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); - return (1); - } + return (1); + } in_recovery = IN_RECOVERY(tp->t_flags); if (tiwin > bbr->r_ctl.rc_high_rwnd) bbr->r_ctl.rc_high_rwnd = tiwin; @@ -11786,8 +11796,6 @@ bbr_do_send_accounting(struct tcpcb *tp, struct tcp_bbr *bbr, struct bbr_sendmap * own bin */ #ifdef NETFLIX_STATS - tp->t_sndtlppack++; - tp->t_sndtlpbyte += len; KMOD_TCPSTAT_INC(tcps_tlpresends); KMOD_TCPSTAT_ADD(tcps_tlpresend_bytes, len); #endif @@ -13741,6 +13749,7 @@ out: * retransmit. In persist state, just set snd_max. */ if (error == 0) { + tcp_account_for_send(tp, len, (rsm != NULL), doing_tlp); if (TCPS_HAVEESTABLISHED(tp->t_state) && (tp->t_flags & TF_SACK_PERMIT) && tp->rcv_numsacks > 0) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 98b8ff836ca5..5227ea59ba23 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -10221,7 +10221,8 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, sbappendstream_locked(&so->so_rcv, m, 0); rack_log_wakeup(tp,rack, &so->so_rcv, tlen, 1); - tp->t_flags |= TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); #ifdef NETFLIX_SB_LIMITS if (so->so_rcv.sb_shlim && appended != mcnt) counter_fo_release(so->so_rcv.sb_shlim, @@ -10238,7 +10239,11 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, thflags = tcp_reass(tp, th, &temp, &tlen, m); tp->t_flags |= TF_ACKNOW; - + if (tp->t_flags & TF_WAKESOR) { + tp->t_flags &= ~TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); + } } if ((tp->t_flags & TF_SACK_PERMIT) && (save_tlen > 0) && @@ -10278,7 +10283,6 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so, save_start + tlen); } } - tcp_handle_wakeup(tp, so); } else { m_freem(m); thflags &= ~TH_FIN; @@ -10484,7 +10488,8 @@ rack_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, ctf_calc_rwin(so, tp); } rack_log_wakeup(tp,rack, &so->so_rcv, tlen, 1); - tp->t_flags |= TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); #ifdef NETFLIX_SB_LIMITS if (so->so_rcv.sb_shlim && mcnt != appended) counter_fo_release(so->so_rcv.sb_shlim, mcnt - appended); @@ -10492,7 +10497,6 @@ rack_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, rack_handle_delayed_ack(tp, rack, tlen, 0); if (tp->snd_una == tp->snd_max) sack_filter_clear(&rack->r_ctl.rack_sf, tp->snd_una); - tcp_handle_wakeup(tp, so); return (1); } @@ -11085,7 +11089,11 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, if (tlen == 0 && (thflags & TH_FIN) == 0) { (void) tcp_reass(tp, (struct tcphdr *)0, NULL, 0, (struct mbuf *)0); - tcp_handle_wakeup(tp, so); + if (tp->t_flags & TF_WAKESOR) { + tp->t_flags &= ~TF_WAKESOR; + /* NB: sorwakeup_locked() does an implicit unlock. */ + sorwakeup_locked(so); + } } tp->snd_wl1 = th->th_seq - 1; /* For syn-recv we need to possibly update the rtt */ @@ -12333,29 +12341,23 @@ rack_fini(struct tcpcb *tp, int32_t tcb_is_purged) rack = (struct tcp_rack *)tp->t_fb_ptr; if (tp->t_in_pkt) { /* - * Since we are switching we need to process any - * inbound packets in case a compressed ack is - * in queue or the new stack does not support - * mbuf queuing. These packets in theory should - * have been handled by the old stack anyway. + * It is unsafe to process the packets since a + * reset may be lurking in them (its rare but it + * can occur). If we were to find a RST, then we + * would end up dropping the connection and the + * INP lock, so when we return the caller (tcp_usrreq) + * will blow up when it trys to unlock the inp. */ - if ((rack->rc_inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT)) || - (rack->rc_inp->inp_flags2 & INP_FREED)) { - /* Kill all the packets */ - struct mbuf *save, *m; - - m = tp->t_in_pkt; - tp->t_in_pkt = NULL; - tp->t_tail_pkt = NULL; - while (m) { - save = m->m_nextpkt; - m->m_nextpkt = NULL; - m_freem(m); - m = save; - } - } else { - /* Process all the packets */ - ctf_do_queued_segments(rack->rc_inp->inp_socket, rack->rc_tp, 0); + struct mbuf *save, *m; + + m = tp->t_in_pkt; + tp->t_in_pkt = NULL; + tp->t_tail_pkt = NULL; + while (m) { + save = m->m_nextpkt; + m->m_nextpkt = NULL; + m_freem(m); + m = save; } if ((tp->t_inpcb) && (tp->t_inpcb->inp_flags2 & INP_MBUF_ACKCMP)) @@ -13997,7 +13999,6 @@ rack_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, } if (rack_do_segment_nounlock(m, th, so, tp, drop_hdrlen, tlen, iptos, 0, &tv) == 0) { - tcp_handle_wakeup(tp, so); INP_WUNLOCK(tp->t_inpcb); } } @@ -15404,6 +15405,8 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma rack->rc_tlp_in_progress = 1; rack->r_ctl.rc_tlp_cnt_out++; } + if (error == 0) + tcp_account_for_send(tp, len, 1, doing_tlp); tp->t_flags &= ~(TF_ACKNOW | TF_DELACK); rack->forced_ack = 0; /* If we send something zap the FA flag */ if (IN_FASTRECOVERY(tp->t_flags) && rsm) @@ -15882,6 +15885,9 @@ again: rack_log_progress_event(rack, tp, ticks, PROGRESS_START, __LINE__); tp->t_acktime = ticks; } + if (error == 0) + tcp_account_for_send(tp, len, 0, 0); + rack->forced_ack = 0; /* If we send something zap the FA flag */ tot_len += len; if ((tp->t_flags & TF_GPUTINPROG) == 0) @@ -16322,8 +16328,6 @@ again: tlen = rsm->r_end - rsm->r_start; if (tlen > segsiz) tlen = segsiz; - tp->t_sndtlppack++; - tp->t_sndtlpbyte += tlen; KASSERT(SEQ_LEQ(tp->snd_una, rsm->r_start), ("%s:%d: r.start:%u < SND.UNA:%u; tp:%p, rack:%p, rsm:%p", __func__, __LINE__, @@ -18107,6 +18111,7 @@ out: * retransmit. In persist state, just set snd_max. */ if (error == 0) { + tcp_account_for_send(tp, len, (rsm != NULL), doing_tlp); rack->forced_ack = 0; /* If we send something zap the FA flag */ if (rsm && (doing_tlp == 0)) { /* Set we retransmitted */ @@ -18151,8 +18156,6 @@ out: if (doing_tlp && (rsm == NULL)) { /* New send doing a TLP */ add_flag |= RACK_TLP; - tp->t_sndtlppack++; - tp->t_sndtlpbyte += len; } rack_log_output(tp, &to, len, rack_seq, (uint8_t) flags, error, rack_to_usec_ts(&tv), diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 1742b3b1c514..553abaf6b334 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -261,6 +261,8 @@ struct tcpcb { uint32_t t_maxpeakrate; /* max peak rate set by user, in bytes/s */ uint32_t t_sndtlppack; /* tail loss probe packets sent */ uint64_t t_sndtlpbyte; /* total tail loss probe bytes sent */ + uint64_t t_sndbytes; /* total bytes sent */ + uint64_t t_snd_rxt_bytes; /* total bytes retransmitted */ uint8_t t_tfo_client_cookie_len; /* TCP Fast Open client cookie length */ uint32_t t_end_info_status; /* Status flag of end info */ @@ -1133,6 +1135,22 @@ tcp_fields_to_net(struct tcphdr *th) th->th_win = htons(th->th_win); th->th_urp = htons(th->th_urp); } + +static inline void +tcp_account_for_send(struct tcpcb *tp, uint32_t len, uint8_t is_rxt, uint8_t is_tlp) +{ + if (is_tlp) { + tp->t_sndtlppack++; + tp->t_sndtlpbyte += len; + } + /* To get total bytes sent you must add t_snd_rxt_bytes to t_sndbytes */ + if (is_rxt) + tp->t_snd_rxt_bytes += len; + else + tp->t_sndbytes += len; + +} + #endif /* _KERNEL */ #endif /* _NETINET_TCP_VAR_H_ */ From owner-dev-commits-src-main@freebsd.org Thu Jun 10 13:04:51 2021 Return-Path: Delivered-To: dev-commits-src-main@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 CF7D764B17B; Thu, 10 Jun 2021 13:04:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G142C5JTMz4jBc; Thu, 10 Jun 2021 13:04:51 +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 9A87B1015A; Thu, 10 Jun 2021 13:04:51 +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 15AD4pa8013375; Thu, 10 Jun 2021 13:04:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15AD4paf013374; Thu, 10 Jun 2021 13:04:51 GMT (envelope-from git) Date: Thu, 10 Jun 2021 13:04:51 GMT Message-Id: <202106101304.15AD4paf013374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa=?= Subject: git: 49ddfdec19b9 - main - ports(7): Add install-missing-packages to target list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49ddfdec19b975ae098cbe9717306d08e8a5879c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 13:04:51 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=49ddfdec19b975ae098cbe9717306d08e8a5879c commit 49ddfdec19b975ae098cbe9717306d08e8a5879c Author: Fernando Apesteguía AuthorDate: 2021-04-30 10:39:04 +0000 Commit: Fernando Apesteguía CommitDate: 2021-06-10 12:58:24 +0000 ports(7): Add install-missing-packages to target list It is already used in the EXAMPLES section. Approved by: bcr@ (manpages) Differential Revision: https://reviews.freebsd.org/D30044 --- share/man/man7/ports.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index ed1e8633fe27..3a62a23d5a13 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 17, 2021 +.Dd June 10, 2021 .Dt PORTS 7 .Os .Sh NAME @@ -217,6 +217,8 @@ target. .It Cm install Install the port and register it with the package system. This is all you really need to do. +.It Cm install-missing-packages +Install missing dependencies from packages instead of building them. .El .Pp The following targets are not run during the normal install process. From owner-dev-commits-src-main@freebsd.org Thu Jun 10 13:17:41 2021 Return-Path: Delivered-To: dev-commits-src-main@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 243A364BA8D; Thu, 10 Jun 2021 13:17:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.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 4G14K001R7z4k1w; Thu, 10 Jun 2021 13:17:39 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f52.google.com with SMTP id a6so26964446ioe.0; Thu, 10 Jun 2021 06:17:39 -0700 (PDT) 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=hm8UK3Gq2UFtPkbsddcHW1UH3P+gc8Piuqfi2jWZj4Y=; b=e6ugjomm3r37a5ca7Ci+vfz45JMjRLJ5eAcDUK0lk2bamyVJMWINS1Z2GWBs69z2Ck qZiKDPm6H5ip5ivINuMO2jlEfTig/sA541Jtg4c5lo+9zSG4g4QsYaQp+hSFtvxNI2CN XQxcddRRRhuHxhhyCAnV4dpFCUzdBSwTxgveEGI/inwPwtX3LrZ9KZDkl6Ytu++XVBO6 /LW9IKezr7XI3heLhAq3MgSDcvsB0lDIBiSy25k4gn69TsExU9r0Sy9S+b2LbAkAYUqh SKlMB451B2Y7B9ZFEn7GMCT4p87bX3Nl7kzlzD363BbqtuWc9YD9wki3uhs4wYHHiWBK oPYg== X-Gm-Message-State: AOAM53137TZGtghqh44XhAiBcmGhGAAZZuU5gswUES8G858RvFNkUF0E CRBMv3sdObJgFXLi40P+CtfgnOdiUqb1YySmHUlVoScJLV4= X-Google-Smtp-Source: ABdhPJzONAkw5g8eTGCUK6yCVKpfVLLlw3YuIopaod4hoBjAOm/Uf/Zf5YYDjHISonD1SLCTepIZYENx1IgjcBNNMTY= X-Received: by 2002:a5d:9c88:: with SMTP id p8mr3597133iop.31.1623331058111; Thu, 10 Jun 2021 06:17:38 -0700 (PDT) MIME-Version: 1.0 References: <202106081453.158Eri7k025234@gitrepo.freebsd.org> In-Reply-To: <202106081453.158Eri7k025234@gitrepo.freebsd.org> From: Ed Maste Date: Thu, 10 Jun 2021 09:16:59 -0400 Message-ID: Subject: Re: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main To: Martin Matuska Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4G14K001R7z4k1w X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.52 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [1.00 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEFALL_USER(0.00)[carpeddiem]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.166.52:from]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; SPAMHAUS_ZRD(0.00)[209.85.166.52:from:127.0.2.255]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.52:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.52:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 13:17:41 -0000 On Tue, 8 Jun 2021 at 10:53, Martin Matuska wrote: > > The branch main has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1603881667360c015f6685131f2f25474fa67a72 > > commit 1603881667360c015f6685131f2f25474fa67a72 > Merge: ed9215c8e05f 75b4cbf62590 > Author: Martin Matuska > AuthorDate: 2021-06-08 14:48:37 +0000 > Commit: Martin Matuska > CommitDate: 2021-06-08 14:52:44 +0000 > > zfs: merge openzfs/zfs@75b4cbf62 (master) into main The Cirrus-CI smoke test (which builds with Clang 12, using the llvm12 package) is failing, with: error: unknown -Werror warning specifier: '-Wno-error-atomic-alignment' [-Werror,-Wunknown-warning-option] *** [atomic.o] Error code 1 CI run link: https://cirrus-ci.com/build/4636225693810688 From owner-dev-commits-src-main@freebsd.org Thu Jun 10 13:20:03 2021 Return-Path: Delivered-To: dev-commits-src-main@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 9563D64B838; Thu, 10 Jun 2021 13:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G14Ml3r1xz4jwh; Thu, 10 Jun 2021 13:20: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 6C484103E3; Thu, 10 Jun 2021 13:20: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 15ADK359029458; Thu, 10 Jun 2021 13:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ADK3FC029454; Thu, 10 Jun 2021 13:20:03 GMT (envelope-from git) Date: Thu, 10 Jun 2021 13:20:03 GMT Message-Id: <202106101320.15ADK3FC029454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa=?= Subject: git: cedaad93176e - main - mmc(4), mmcsc(4): Remove missing Xref MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cedaad93176e2a0680e929ff683cf8d173e3c562 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 13:20:03 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cedaad93176e2a0680e929ff683cf8d173e3c562 commit cedaad93176e2a0680e929ff683cf8d173e3c562 Author: Fernando Apesteguía AuthorDate: 2021-06-10 13:11:22 +0000 Commit: Fernando Apesteguía CommitDate: 2021-06-10 13:15:54 +0000 mmc(4), mmcsc(4): Remove missing Xref There is no evidence of at91_mci in the code whatsoever. Most of the at91 drivers where removed in 802baf0ba66c18ca52aeaf4a3e7b05e85d8e4d3b PR: 218970 Reported by: reezer@reezer.org Approved by: imp@ Differential Revision: https://reviews.freebsd.org/D29193 --- share/man/man4/mmc.4 | 3 +-- share/man/man4/mmcsd.4 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/share/man/man4/mmc.4 b/share/man/man4/mmc.4 index 49f333135ade..430bca983280 100644 --- a/share/man/man4/mmc.4 +++ b/share/man/man4/mmc.4 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2008 +.Dd June 10, 2021 .Dt MMC 4 .Os .Sh NAME @@ -46,7 +46,6 @@ bus typically has only one slot, and only memory cards. MultiMediaCards exist only in memory. SD Cards exist as memory, I/O, or combination cards. .Sh SEE ALSO -.Xr at91_mci 4 , .Xr mmcsd 4 , .Xr sdhci 4 .Rs diff --git a/share/man/man4/mmcsd.4 b/share/man/man4/mmcsd.4 index e66867eb3453..9779183c64d4 100644 --- a/share/man/man4/mmcsd.4 +++ b/share/man/man4/mmcsd.4 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 22, 2008 +.Dd June 10, 2021 .Dt MMCSD 4 .Os .Sh NAME @@ -36,7 +36,6 @@ The .Nm driver implements direct access block device for MMC and SD memory cards. .Sh SEE ALSO -.Xr at91_mci 4 , .Xr mmc 4 , .Xr sdhci 4 .Rs From owner-dev-commits-src-main@freebsd.org Thu Jun 10 15:15:41 2021 Return-Path: Delivered-To: dev-commits-src-main@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 C075164EF4B; Thu, 10 Jun 2021 15:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G16x94kJpz3JKm; Thu, 10 Jun 2021 15:15:41 +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 8A7CB11FDA; Thu, 10 Jun 2021 15:15:41 +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 15AFFfhV091224; Thu, 10 Jun 2021 15:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15AFFfsJ091223; Thu, 10 Jun 2021 15:15:41 GMT (envelope-from git) Date: Thu, 10 Jun 2021 15:15:41 GMT Message-Id: <202106101515.15AFFfsJ091223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Neel Chauhan Subject: git: b47f461c8e67 - main - linuxkpi: Add list_for_each_entry_lockless() macro MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b47f461c8e67253fdb394968428b760e880baa08 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 15:15:41 -0000 The branch main has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b47f461c8e67253fdb394968428b760e880baa08 commit b47f461c8e67253fdb394968428b760e880baa08 Author: Neel Chauhan AuthorDate: 2021-06-10 15:14:20 +0000 Commit: Neel Chauhan CommitDate: 2021-06-10 15:15:29 +0000 linuxkpi: Add list_for_each_entry_lockless() macro This is needed by the drm-kmod 5.7 update. Approved by: hselasky (src) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30708 --- sys/compat/linuxkpi/common/include/linux/list.h | 2 ++ sys/sys/param.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index 37b5b751d21b..93db449a4473 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -202,6 +202,8 @@ list_del_init(struct list_head *entry) for (p = list_entry((h)->next, typeof(*p), field); &(p)->field != (h); \ p = list_entry((p)->field.next, typeof(*p), field)) +#define list_for_each_entry_lockless(...) list_for_each_entry(__VA_ARGS__) + #define list_for_each_entry_safe(p, n, h, field) \ for (p = list_entry((h)->next, typeof(*p), field), \ n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\ diff --git a/sys/sys/param.h b/sys/sys/param.h index d78612b5ebb9..afcba3990b07 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400020 +#define __FreeBSD_version 1400021 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-main@freebsd.org Thu Jun 10 15:29:04 2021 Return-Path: Delivered-To: dev-commits-src-main@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 99DC264F257; Thu, 10 Jun 2021 15:29:04 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G17Db6ycnz3KkC; Thu, 10 Jun 2021 15:29:03 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1623338935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Go211XGVK8qIB9E1eVbaB1uuFK2ZKKrDLyFIn2NQz74=; b=DMxNSwgmLwmTO2tvyUvlP/gU82Fw7nphLD3OvojURkcULcmaucibK6KYp6ghEGPHXXwZH/ lTzO3EaIug9NpoekLIl+/xra8RHeO6i891wRhsEgG7sXGLQBA64saU+xWReZvyTLxuQ2qd 3jEoxpDcBBO5oScdlRYhxLVaCesRalM= Received: from skull.home.blih.net (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 1bc17a98 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 10 Jun 2021 15:28:55 +0000 (UTC) Date: Thu, 10 Jun 2021 17:28:55 +0200 From: Emmanuel Vadot To: Neel Chauhan Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b47f461c8e67 - main - linuxkpi: Add list_for_each_entry_lockless() macro Message-Id: <20210610172855.287c62fd10d7963e2364e342@bidouilliste.com> In-Reply-To: <202106101515.15AFFfsJ091223@gitrepo.freebsd.org> References: <202106101515.15AFFfsJ091223@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4G17Db6ycnz3KkC 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 15:29:04 -0000 On Thu, 10 Jun 2021 15:15:41 GMT Neel Chauhan wrote: > The branch main has been updated by nc (ports committer): > > URL: https://cgit.FreeBSD.org/src/commit/?id=b47f461c8e67253fdb394968428b760e880baa08 > > commit b47f461c8e67253fdb394968428b760e880baa08 > Author: Neel Chauhan > AuthorDate: 2021-06-10 15:14:20 +0000 > Commit: Neel Chauhan > CommitDate: 2021-06-10 15:15:29 +0000 > > linuxkpi: Add list_for_each_entry_lockless() macro > > This is needed by the drm-kmod 5.7 update. You did not explain why it's the same as list_for_each_entry. > Approved by: hselasky (src) > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D30708 > --- > sys/compat/linuxkpi/common/include/linux/list.h | 2 ++ > sys/sys/param.h | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h > index 37b5b751d21b..93db449a4473 100644 > --- a/sys/compat/linuxkpi/common/include/linux/list.h > +++ b/sys/compat/linuxkpi/common/include/linux/list.h > @@ -202,6 +202,8 @@ list_del_init(struct list_head *entry) > for (p = list_entry((h)->next, typeof(*p), field); &(p)->field != (h); \ > p = list_entry((p)->field.next, typeof(*p), field)) > > +#define list_for_each_entry_lockless(...) list_for_each_entry(__VA_ARGS__) > + > #define list_for_each_entry_safe(p, n, h, field) \ > for (p = list_entry((h)->next, typeof(*p), field), \ > n = list_entry((p)->field.next, typeof(*p), field); &(p)->field != (h);\ > diff --git a/sys/sys/param.h b/sys/sys/param.h > index d78612b5ebb9..afcba3990b07 100644 > --- a/sys/sys/param.h > +++ b/sys/sys/param.h > @@ -76,7 +76,7 @@ > * cannot include sys/param.h and should only be updated here. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1400020 > +#define __FreeBSD_version 1400021 No need to bump FreeBSD_version with each one of your commit to linuxkpi, this will only be painful for people tracking current and building there packages. > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, -- Emmanuel Vadot From owner-dev-commits-src-main@freebsd.org Thu Jun 10 19:21:24 2021 Return-Path: Delivered-To: dev-commits-src-main@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 6ED8765279C; Thu, 10 Jun 2021 19:21:24 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 4G1DNh2PT8z4TMM; Thu, 10 Jun 2021 19:21:24 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id u24so34341116edy.11; Thu, 10 Jun 2021 12:21:24 -0700 (PDT) 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=s3/SYAEKvVLd9tK7dvIJcJWNpjbJlcNGJwaNFzeQiAc=; b=ClQdKKhhQughvziNgM8B1lMY70xKw4F/eV9Bs89Kfv44VOodVGUCIVlcoMzOs9fqHw /+h1E09f45rTZakGCMdwp1Nc95EQePLcCRd3HIjSMzvmEIdztfapDTS5/516401uuX0N CW12y65VDOrP8xnyOUXRtyiDCBOHB3zkrT4+rSu7tcYmr9U4IvlJbq4QBbJ+Sx2sJ3cv IYRtP4RwBvhpSdRze0WsF3ALF6dWpOQkBZLjcSnFmOD1ChpOxcqsI2Ft/nwGl7UxMDo5 WZVyCwVsVqN4KfFYqQJpN7atfLvF4GtFXAxCHnxujYILgJFDQj2xempmwLefYoGV9UkM CRLg== X-Gm-Message-State: AOAM5310Oykb5pqfa0w5SmT3QLF3ezhf/7ExOxnnaRAwXDKu98nmzTjz kf18cvdZygnh+65vi9/WemGSxIE1uVH9+A== X-Google-Smtp-Source: ABdhPJxLvZZL3yTNLoTBy1iX1dC9nBWNW7zwKUqNjff9s1l7RUctvaEaQ0wQLvMfZRDsoy1Qj5fGRw== X-Received: by 2002:aa7:cd9a:: with SMTP id x26mr29574edv.185.1623352882558; Thu, 10 Jun 2021 12:21:22 -0700 (PDT) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com. [209.85.128.50]) by smtp.gmail.com with ESMTPSA id y10sm1692334edc.66.2021.06.10.12.21.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Jun 2021 12:21:22 -0700 (PDT) Received: by mail-wm1-f50.google.com with SMTP id t4-20020a1c77040000b029019d22d84ebdso7232784wmi.3; Thu, 10 Jun 2021 12:21:22 -0700 (PDT) X-Received: by 2002:a7b:c042:: with SMTP id u2mr355774wmc.127.1623352881963; Thu, 10 Jun 2021 12:21:21 -0700 (PDT) MIME-Version: 1.0 References: <202106081453.158Eri7k025234@gitrepo.freebsd.org> In-Reply-To: From: Alexander Richardson Date: Thu, 10 Jun 2021 20:21:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main To: Ed Maste Cc: Martin Matuska , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4G1DNh2PT8z4TMM 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)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 19:21:24 -0000 On Thu, 10 Jun 2021, 14:17 Ed Maste, wrote: > On Tue, 8 Jun 2021 at 10:53, Martin Matuska wrote: > > > > The branch main has been updated by mm: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=1603881667360c015f6685131f2f25474fa67a72 > > > > commit 1603881667360c015f6685131f2f25474fa67a72 > > Merge: ed9215c8e05f 75b4cbf62590 > > Author: Martin Matuska > > AuthorDate: 2021-06-08 14:48:37 +0000 > > Commit: Martin Matuska > > CommitDate: 2021-06-08 14:52:44 +0000 > > > > zfs: merge openzfs/zfs@75b4cbf62 (master) into main > > The Cirrus-CI smoke test (which builds with Clang 12, using the llvm12 > package) is failing, with: > > error: unknown -Werror warning specifier: > '-Wno-error-atomic-alignment' [-Werror,-Wunknown-warning-option] > *** [atomic.o] Error code 1 > > CI run link: https://cirrus-ci.com/build/4636225693810688 Clang no longer accepts -Wno-error-foo, it needs to be changed to -Wno-error=foo > > From owner-dev-commits-src-main@freebsd.org Thu Jun 10 19:32:43 2021 Return-Path: Delivered-To: dev-commits-src-main@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 8CEA2652A5E for ; Thu, 10 Jun 2021 19:32:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (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 4G1Ddl3NS3z4V1f for ; Thu, 10 Jun 2021 19:32:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x736.google.com with SMTP id i68so24982387qke.3 for ; Thu, 10 Jun 2021 12:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A2dloJr7g5mxhPDaNbGK04xNDHYi3oi8c+RusGRFsKI=; b=sR6LwDdQvLGRzlxkjBjXIp/aVK0OcOtjcQT2/lKLd9ItN2yKdnCpltYog9oTUCpPm3 c2h++DK9b9vQ0JmJyAbXy7NrAxAaCj+iS+PoLByhK3Ni4+1Z3pZvawjAwsgkBpMu4V27 +1Tb7iU5YH3vwWm5+TN2Wg4NqaBqPwvlWcbV5lHTnbL0sLySUWDMZKBsGS7W5h4fK7xa oqsFzpqjl6jBK0uQivqovI98rDQwQomZTPoDDHyJzZ/n2y/S4k85pcTLV73WBJM3OrGd chVkLMYH17BDuPo5U1R0cawGhj03mAFGR5ihko5LUEAdZMsXl13F814bl7VRmrKwgllL dZzg== 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=A2dloJr7g5mxhPDaNbGK04xNDHYi3oi8c+RusGRFsKI=; b=FoXhKlMKIh7hZoXKJE1y4PEAoDW70tqWhoz1lR4kGfc1DIm7z0Ugu/o/Hev6H4YntK r88I4wF3LLhmkwvjWukXeIC3DEhEfhCeMjmsA+XhP/j01Qkb0qnAuIswM2D+Dj1OQUEp ljOkusdw2VhKNtvltfmQ3kgiDLwdl+KsyLN/MKEeY+Sbig0rdf7WNM5LhU0KL+ecJ6ye 9oLszK6Hl2or1cz1qlglGBrMb1RNfq7n4+3/TI06E7HMZXVBCod2J1j5i4GQa+mRI603 G6wYMInwzG/5LKiohJB1FV3U1ruGhR4dpgaDq4eOqRv2DKXdkIqK41VCOr6R39Sor9Yq KtUQ== X-Gm-Message-State: AOAM53253jKGRO3lcGr2VvEA4NINL6C6cb4ncslFOe7IJgTsm263B7qc 39FyTcYkId6EK3Ey0ek98+P5BtCrldx7aUb76hj62Q== X-Google-Smtp-Source: ABdhPJzH9BodLyxWNm4S2xKGpvHLeq/hpkW+CQ+KQfr3xlcUgSj4Zbc+27ogCJAKvWfAeS81sXB9cwYYgIjEv3Ks4hk= X-Received: by 2002:a37:f502:: with SMTP id l2mr181394qkk.195.1623353562199; Thu, 10 Jun 2021 12:32:42 -0700 (PDT) MIME-Version: 1.0 References: <202106081453.158Eri7k025234@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 10 Jun 2021 13:32:31 -0600 Message-ID: Subject: Re: git: 160388166736 - main - zfs: merge openzfs/zfs@75b4cbf62 (master) into main To: Alexander Richardson Cc: Ed Maste , Martin Matuska , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4G1Ddl3NS3z4V1f 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 19:32:43 -0000 On Thu, Jun 10, 2021 at 1:21 PM Alexander Richardson < arichardson@freebsd.org> wrote: > > On Thu, 10 Jun 2021, 14:17 Ed Maste, wrote: > >> On Tue, 8 Jun 2021 at 10:53, Martin Matuska wrote: >> > >> > The branch main has been updated by mm: >> > >> > URL: >> https://cgit.FreeBSD.org/src/commit/?id=1603881667360c015f6685131f2f25474fa67a72 >> > >> > commit 1603881667360c015f6685131f2f25474fa67a72 >> > Merge: ed9215c8e05f 75b4cbf62590 >> > Author: Martin Matuska >> > AuthorDate: 2021-06-08 14:48:37 +0000 >> > Commit: Martin Matuska >> > CommitDate: 2021-06-08 14:52:44 +0000 >> > >> > zfs: merge openzfs/zfs@75b4cbf62 (master) into main >> >> The Cirrus-CI smoke test (which builds with Clang 12, using the llvm12 >> package) is failing, with: >> >> error: unknown -Werror warning specifier: >> '-Wno-error-atomic-alignment' [-Werror,-Wunknown-warning-option] >> *** [atomic.o] Error code 1 >> >> CI run link: https://cirrus-ci.com/build/4636225693810688 > > > Clang no longer accepts -Wno-error-foo, it needs to be changed to > -Wno-error=foo > I wonder why it worked for me :( Warner From owner-dev-commits-src-main@freebsd.org Thu Jun 10 19:38:17 2021 Return-Path: Delivered-To: dev-commits-src-main@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 4FF48652C59 for ; Thu, 10 Jun 2021 19:38:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 4G1Dm91d8jz4Twh for ; Thu, 10 Jun 2021 19:38:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id d196so23431135qkg.12 for ; Thu, 10 Jun 2021 12:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lit476FEPRpHQyltE1dnAJH6U1K9V519M/N8KpRMg8Y=; b=Cb6C72T0/BPPw4kCEyANzWNCqndIDt6wBez+zECLOPTC2dldYWMfyIVbxxaKGgVFZZ eM5wezcxh465HgrnkEvdC/XmEG3vzyRdcq90NGCGjBbrxXn0IRIG4L7fPE0TViSd5Uhu K+7/l/NYxXHL2mo0miO2BtJWfRJiY/H/w42S1XZLWzOkImb8r0sOB85vziU7b5bV3SBS q1viJ14yuwL2dEgBBA/sWCIEYXD8MhZ0ZbO2H8l2LH2tjCoTmFyRYdEHtckSyN+NZ6mo 4ujFK+78i2y/iy8opsM2wBwSGCfHF69hCf5HrIskuGkU768WUcqyxDM6wVsft9kgEHLw MvYw== 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=lit476FEPRpHQyltE1dnAJH6U1K9V519M/N8KpRMg8Y=; b=jGVBvvTEoTUktej0Y1eatnNpPGzECS8b348sYW6pLPtAva9oh7IRyg+AUws34x/CyZ NyFVsFu+30jIy+iqlHUx7UZpF7PCJQY0NXoTHPihxNwjYi9JMRngHq8EO2f+keZVdD0S BdCCcmmDW9wghzqy+7XKQrXdg9kNwYaq/SYMIonJwuaqJr5jASMPorU4OxpDDsJ4KBMe PoQaDdoFVw7WjSH9ciXx8n8lZBqGcafk3+SRfWcSVKPJx8xouBA+lNmwHVqCvMyQqE+L BXCLE2/O0es974IwaCHRyjAIcb55uIatw9FeUHOCr0ivilGJoOpjOaajK+5HkGtr6CS2 0klg== X-Gm-Message-State: AOAM531XqzJaCilMAfV0NHhw8ZyfmzhcFz5PodbWoRYt6G14g4ndKUzO BKMfvwKM3B7tdsUFL2KmspFcccxM4kp6n7470ZyfHw== X-Google-Smtp-Source: ABdhPJwKdIIZY4F8DeCKDIrECW4bVsgZ8aPVfbfWxH+SfrYIpy2588rPni3jNz1PoDJuKOt068fdFftPvqv8fn8YzH0= X-Received: by 2002:a37:9ccb:: with SMTP id f194mr234467qke.206.1623353896226; Thu, 10 Jun 2021 12:38:16 -0700 (PDT) MIME-Version: 1.0 References: <202106100011.15A0B0oI080542@gitrepo.freebsd.org> <202106101146.15ABk345019564@gndrsh.dnsmgr.net> In-Reply-To: <202106101146.15ABk345019564@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 10 Jun 2021 13:38:05 -0600 Message-ID: Subject: Re: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4G1Dm91d8jz4Twh 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 19:38:17 -0000 On Thu, Jun 10, 2021 at 5:46 AM Rodney W. Grimes wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > Author: Warner Losh > > AuthorDate: 2021-06-10 00:10:12 +0000 > > Commit: Warner Losh > > CommitDate: 2021-06-10 00:10:52 +0000 > > > > mk: WITH_FOO=no now generates a warning > > First off thank you, this may stop some head scratching! > > But what about WITHOUT_foo=no the symetrical mistake? > I see bdrewey raised this in the review, but it was dismissed > using the argument that some languages, spanish specifically, > allow double negatives. This is computers engineering, > and in that field of science double negatives are clearly > defined and understood, so using an argument of a language > that simply does not apply to the field, IMHO, is an arguement > of low standing. > It's not the same, and I'm not solving that error because the mapping is ambiguous. I've seen a lot more instances of people using WITHOUT_FOO=no unironically because it makes sense to the person doing it. I disagree it's not a language issue, because language is involved here: how do we assign semantic meaning is unclear and I have no desire to get involved in what I clearly view as a quagmire. > Also I do not believe == is a case insensitive operation > so this code fails for NO, No, and nO(sic). > Also true. Again, this isn't perfect. I have no desire to make it perfect, because the list isn't finite. If you'd like to own this issue, feel free, but it's not something I wish to pursue further. Warner > Regards, > Rod > > > > Many people are used to gnu configure's behavior of changing > > --with-foo=no to --without-foo. At the same time, several folks have > > WITH_FOO=no in their config files to enable this ironic form of the > > option because of an old meme from IRC, a mailing list or the forums > (I > > forget which). Add a warning to allow to alert people w/o breaking > POLA. > > > > Reviewed by: allanjude, bdrewery, manu > > MFC After: 2 weeks > > Sponsored by: Netflix > > Differential Revision: https://reviews.freebsd.org/D30684 > > --- > > share/mk/bsd.mkopt.mk | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk > > index 5a9cf1b2f1be..98d23dd46c2a 100644 > > --- a/share/mk/bsd.mkopt.mk > > +++ b/share/mk/bsd.mkopt.mk > > @@ -36,6 +36,9 @@ > > # > > .for var in ${__DEFAULT_YES_OPTIONS} > > .if !defined(MK_${var}) > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > +.endif > > .if defined(WITHOUT_${var}) # WITHOUT always wins > > MK_${var}:= no > > .else > > @@ -54,6 +57,9 @@ MK_${var}:= yes > > # > > .for var in ${__DEFAULT_NO_OPTIONS} > > .if !defined(MK_${var}) > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > +.endif > > .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always > wins > > MK_${var}:= yes > > .else > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-dev-commits-src-main@freebsd.org Thu Jun 10 19:48:53 2021 Return-Path: Delivered-To: dev-commits-src-main@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 50DE06530AB; Thu, 10 Jun 2021 19:48:53 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1F0N697yz4VKV; Thu, 10 Jun 2021 19:48:52 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 15AJmlwS021047; Thu, 10 Jun 2021 12:48:47 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 15AJmlgS021046; Thu, 10 Jun 2021 12:48:47 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> Subject: Re: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning In-Reply-To: To: Warner Losh Date: Thu, 10 Jun 2021 12:48:47 -0700 (PDT) CC: "Rodney W. Grimes" , Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4G1F0N697yz4VKV 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 19:48:53 -0000 > On Thu, Jun 10, 2021 at 5:46 AM Rodney W. Grimes > wrote: > > > > The branch main has been updated by imp: > > > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > > > commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > Author: Warner Losh > > > AuthorDate: 2021-06-10 00:10:12 +0000 > > > Commit: Warner Losh > > > CommitDate: 2021-06-10 00:10:52 +0000 > > > > > > mk: WITH_FOO=no now generates a warning > > > > First off thank you, this may stop some head scratching! > > > > But what about WITHOUT_foo=no the symetrical mistake? > > I see bdrewey raised this in the review, but it was dismissed > > using the argument that some languages, spanish specifically, > > allow double negatives. This is computers engineering, > > and in that field of science double negatives are clearly > > defined and understood, so using an argument of a language > > that simply does not apply to the field, IMHO, is an arguement > > of low standing. > > > > It's not the same, and I'm not solving that error because the mapping > is ambiguous. I've seen a lot more instances of people using > WITHOUT_FOO=no unironically because it makes sense to the > person doing it. I disagree it's not a language issue, because > language is involved here: how do we assign semantic meaning > is unclear and I have no desire to get involved in what I clearly > view as a quagmire. > > > > Also I do not believe == is a case insensitive operation > > so this code fails for NO, No, and nO(sic). > > > > Also true. Again, this isn't perfect. I have no desire to make it > perfect, because the list isn't finite. > > If you'd like to own this issue, feel free, but it's not something I > wish to pursue further. You touched it, you own it. > Warner > > > > Regards, > > Rod > > > > > > Many people are used to gnu configure's behavior of changing > > > --with-foo=no to --without-foo. At the same time, several folks have > > > WITH_FOO=no in their config files to enable this ironic form of the > > > option because of an old meme from IRC, a mailing list or the forums > > (I > > > forget which). Add a warning to allow to alert people w/o breaking > > POLA. > > > > > > Reviewed by: allanjude, bdrewery, manu > > > MFC After: 2 weeks > > > Sponsored by: Netflix > > > Differential Revision: https://reviews.freebsd.org/D30684 > > > --- > > > share/mk/bsd.mkopt.mk | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk > > > index 5a9cf1b2f1be..98d23dd46c2a 100644 > > > --- a/share/mk/bsd.mkopt.mk > > > +++ b/share/mk/bsd.mkopt.mk > > > @@ -36,6 +36,9 @@ > > > # > > > .for var in ${__DEFAULT_YES_OPTIONS} > > > .if !defined(MK_${var}) > > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > > +.endif > > > .if defined(WITHOUT_${var}) # WITHOUT always wins > > > MK_${var}:= no > > > .else > > > @@ -54,6 +57,9 @@ MK_${var}:= yes > > > # > > > .for var in ${__DEFAULT_NO_OPTIONS} > > > .if !defined(MK_${var}) > > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > > +.endif > > > .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always > > wins > > > MK_${var}:= yes > > > .else > > > > > > > -- > > Rod Grimes > > rgrimes@freebsd.org > > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Thu Jun 10 21:43:20 2021 Return-Path: Delivered-To: dev-commits-src-main@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 1D629653EE1; Thu, 10 Jun 2021 21:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1HXR3nXSz4fbd; Thu, 10 Jun 2021 21:43:19 +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 5E4DE1722D; Thu, 10 Jun 2021 21:43: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 15ALhJ09009459; Thu, 10 Jun 2021 21:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ALhJ62009458; Thu, 10 Jun 2021 21:43:19 GMT (envelope-from git) Date: Thu, 10 Jun 2021 21:43:19 GMT Message-Id: <202106102143.15ALhJ62009458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 294799c6b081 - main - libalias: tidy up housekeeping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 294799c6b081faece556a5010a4f51552e131c2f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 21:43:20 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=294799c6b081faece556a5010a4f51552e131c2f commit 294799c6b081faece556a5010a4f51552e131c2f Author: Lutz Donnerhacke AuthorDate: 2021-05-15 15:35:36 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-10 21:30:10 +0000 libalias: tidy up housekeeping Replace current expensive, but sparsly called housekeeping by a single, repetive action. This is part of a larger restructure of libalias in order to switch to more efficient data structures. The whole restructure process is split into 15 reviews to ease reviewing. All those steps will be squashed into a single commit for MFC in order to hide the intermediate states from production systems. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30277 --- sys/netinet/libalias/alias_db.c | 104 ++++++++++++++++--------------------- sys/netinet/libalias/alias_local.h | 6 +-- 2 files changed, 47 insertions(+), 63 deletions(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index d7027f4e25c2..fca2f33906d3 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -182,11 +182,6 @@ static LIST_HEAD(, libalias) instancehead = LIST_HEAD_INITIALIZER(instancehead); near relevant functions or structs) */ -/* Parameters used for cleanup of expired links */ -/* NOTE: ALIAS_CLEANUP_INTERVAL_SECS must be less then LINK_TABLE_OUT_SIZE */ -#define ALIAS_CLEANUP_INTERVAL_SECS 64 -#define ALIAS_CLEANUP_MAX_SPOKES (LINK_TABLE_OUT_SIZE/5) - /* Timeouts (in seconds) for different link types */ #define ICMP_EXPIRE_TIME 60 #define UDP_EXPIRE_TIME 60 @@ -329,6 +324,7 @@ struct alias_link { /* Linked list of pointers for input and output lookup tables */ LIST_ENTRY (alias_link) list_out; LIST_ENTRY (alias_link) list_in; + TAILQ_ENTRY (alias_link) list_expire; /* Auxiliary data */ union { char *frag_ptr; @@ -510,7 +506,7 @@ Port Allocation: Link creation and deletion: CleanupAliasData() - remove all link chains from lookup table - IncrementalCleanup() - look for stale links in a single chain + CleanupLink() - look for a stale link DeleteLink() - remove link AddLink() - add link ReLink() - change link @@ -529,8 +525,8 @@ static int GetNewPort(struct libalias *, struct alias_link *, int); static u_short GetSocket(struct libalias *, u_short, int *, int); #endif static void CleanupAliasData(struct libalias *); -static void IncrementalCleanup(struct libalias *); -static void DeleteLink(struct alias_link *); +static void CleanupLink(struct libalias *, struct alias_link **); +static void DeleteLink(struct alias_link **); static struct alias_link * ReLink(struct alias_link *, @@ -807,41 +803,38 @@ FindNewPortGroup(struct libalias *la, static void CleanupAliasData(struct libalias *la) { - struct alias_link *lnk; - int i; + struct alias_link *lnk, *lnk_tmp; LIBALIAS_LOCK_ASSERT(la); - for (i = 0; i < LINK_TABLE_OUT_SIZE; i++) { - lnk = LIST_FIRST(&la->linkTableOut[i]); - while (lnk != NULL) { - struct alias_link *link_next = LIST_NEXT(lnk, list_out); - DeleteLink(lnk); - lnk = link_next; - } - } - la->cleanupIndex = 0; + /* permanent entries may stay */ + TAILQ_FOREACH_SAFE(lnk, &la->checkExpire, list_expire, lnk_tmp) + DeleteLink(&lnk); } static void -IncrementalCleanup(struct libalias *la) +CleanupLink(struct libalias *la, struct alias_link **lnk) { - struct alias_link *lnk, *lnk_tmp; - LIBALIAS_LOCK_ASSERT(la); - LIST_FOREACH_SAFE(lnk, &la->linkTableOut[la->cleanupIndex++], - list_out, lnk_tmp) { - if (la->timeStamp - lnk->timestamp > lnk->expire_time) - DeleteLink(lnk); + + if (lnk == NULL || *lnk == NULL) + return; + + if (la->timeStamp - (*lnk)->timestamp > (*lnk)->expire_time) { + DeleteLink(lnk); + if ((*lnk) == NULL) + return; } - if (la->cleanupIndex == LINK_TABLE_OUT_SIZE) - la->cleanupIndex = 0; + /* move to end, swap may fail on a single entry list */ + TAILQ_REMOVE(&la->checkExpire, (*lnk), list_expire); + TAILQ_INSERT_TAIL(&la->checkExpire, (*lnk), list_expire); } static void -DeleteLink(struct alias_link *lnk) +DeleteLink(struct alias_link **plnk) { + struct alias_link *lnk = *plnk; struct libalias *la = lnk->la; LIBALIAS_LOCK_ASSERT(la); @@ -869,6 +862,10 @@ DeleteLink(struct alias_link *lnk) /* Adjust input table pointers */ LIST_REMOVE(lnk, list_in); + + /* remove from housekeeping */ + TAILQ_REMOVE(&la->checkExpire, lnk, list_expire); + #ifndef NO_USE_SOCKETS /* Close socket, if one has been allocated */ if (lnk->sockfd != -1) { @@ -908,6 +905,7 @@ DeleteLink(struct alias_link *lnk) /* Free memory */ free(lnk); + *plnk = NULL; /* Write statistics, if logging enabled */ if (la->packetAliasMode & PKT_ALIAS_LOG) { @@ -1039,6 +1037,9 @@ AddLink(struct libalias *la, struct in_addr src_addr, struct in_addr dst_addr, /* Set up pointers for input lookup table */ start_point = StartPointIn(alias_addr, lnk->alias_port, link_type); LIST_INSERT_HEAD(&la->linkTableIn[start_point], lnk, list_in); + + /* Include the element into the housekeeping list */ + TAILQ_INSERT_TAIL(&la->checkExpire, lnk, list_expire); } else { #ifdef LIBALIAS_DEBUG fprintf(stderr, "PacketAlias/AddLink(): "); @@ -1079,7 +1080,7 @@ ReLink(struct alias_link *old_lnk, PunchFWHole(new_lnk); } #endif - DeleteLink(old_lnk); + DeleteLink(&old_lnk); return (new_lnk); } @@ -1102,12 +1103,14 @@ _FindLinkOut(struct libalias *la, struct in_addr src_addr, lnk->src_port == src_port && lnk->dst_port == dst_port && lnk->link_type == link_type && - lnk->server == NULL) { - lnk->timestamp = la->timeStamp; + lnk->server == NULL) break; - } } + CleanupLink(la, &lnk); + if (lnk != NULL) + lnk->timestamp = la->timeStamp; + /* Search for partially specified links. */ if (lnk == NULL && replace_partial_links) { if (dst_port != 0 && dst_addr.s_addr != INADDR_ANY) { @@ -1235,6 +1238,7 @@ _FindLinkIn(struct libalias *la, struct in_addr dst_addr, } } + CleanupLink(la, &lnk_fully_specified); if (lnk_fully_specified != NULL) { lnk_fully_specified->timestamp = la->timeStamp; lnk = lnk_fully_specified; @@ -1572,6 +1576,7 @@ FindPptpOutByCallId(struct libalias *la, struct in_addr src_addr, lnk->src_port == src_call_id) break; + CleanupLink(la, &lnk); return (lnk); } @@ -1592,6 +1597,7 @@ FindPptpOutByPeerCallId(struct libalias *la, struct in_addr src_addr, lnk->dst_port == dst_call_id) break; + CleanupLink(la, &lnk); return (lnk); } @@ -1612,6 +1618,7 @@ FindPptpInByCallId(struct libalias *la, struct in_addr dst_addr, lnk->dst_port == dst_call_id) break; + CleanupLink(la, &lnk); return (lnk); } @@ -2038,7 +2045,7 @@ SetExpire(struct alias_link *lnk, int expire) { if (expire == 0) { lnk->flags &= ~LINK_PERMANENT; - DeleteLink(lnk); + DeleteLink(&lnk); } else if (expire == -1) { lnk->flags |= LINK_PERMANENT; } else if (expire > 0) { @@ -2094,7 +2101,7 @@ SetDestCallId(struct alias_link *lnk, u_int16_t cid) void HouseKeeping(struct libalias *la) { - int i, n; + struct alias_link * lnk = TAILQ_FIRST(&la->checkExpire); #ifndef _KERNEL struct timeval tv; #endif @@ -2111,25 +2118,7 @@ HouseKeeping(struct libalias *la) gettimeofday(&tv, NULL); la->timeStamp = tv.tv_sec; #endif - - /* Compute number of spokes (output table link chains) to cover */ - n = LINK_TABLE_OUT_SIZE * (la->timeStamp - la->lastCleanupTime); - n /= ALIAS_CLEANUP_INTERVAL_SECS; - - /* Handle different cases */ - if (n > 0) { - if (n > ALIAS_CLEANUP_MAX_SPOKES) - n = ALIAS_CLEANUP_MAX_SPOKES; - la->lastCleanupTime = la->timeStamp; - for (i = 0; i < n; i++) - IncrementalCleanup(la); - } else if (n < 0) { -#ifdef LIBALIAS_DEBUG - fprintf(stderr, "PacketAlias/HouseKeeping(): "); - fprintf(stderr, "something unexpected in time values\n"); -#endif - la->lastCleanupTime = la->timeStamp; - } + CleanupLink(la, &lnk); } /* Init the log file and enable logging */ @@ -2356,7 +2345,7 @@ LibAliasRedirectDelete(struct libalias *la, struct alias_link *lnk) { LIBALIAS_LOCK(la); la->deleteAllLinks = 1; - DeleteLink(lnk); + DeleteLink(&lnk); la->deleteAllLinks = 0; LIBALIAS_UNLOCK(la); } @@ -2426,17 +2415,16 @@ LibAliasInit(struct libalias *la) #ifdef _KERNEL la->timeStamp = time_uptime; - la->lastCleanupTime = time_uptime; #else gettimeofday(&tv, NULL); la->timeStamp = tv.tv_sec; - la->lastCleanupTime = tv.tv_sec; #endif for (i = 0; i < LINK_TABLE_OUT_SIZE; i++) LIST_INIT(&la->linkTableOut[i]); for (i = 0; i < LINK_TABLE_IN_SIZE; i++) LIST_INIT(&la->linkTableIn[i]); + TAILQ_INIT(&la->checkExpire); #ifdef _KERNEL AliasSctpInit(la); #endif @@ -2466,8 +2454,6 @@ LibAliasInit(struct libalias *la) la->fragmentPtrLinkCount = 0; la->sockCount = 0; - la->cleanupIndex = 0; - la->packetAliasMode = PKT_ALIAS_SAME_PORTS #ifndef NO_USE_SOCKETS | PKT_ALIAS_USE_SOCKETS diff --git a/sys/netinet/libalias/alias_local.h b/sys/netinet/libalias/alias_local.h index 61cd30737ce5..fcdaa1690470 100644 --- a/sys/netinet/libalias/alias_local.h +++ b/sys/netinet/libalias/alias_local.h @@ -94,6 +94,8 @@ struct libalias { * output lookup tables. */ LIST_HEAD (, alias_link) linkTableOut[LINK_TABLE_OUT_SIZE]; LIST_HEAD (, alias_link) linkTableIn[LINK_TABLE_IN_SIZE]; + /* HouseKeeping */ + TAILQ_HEAD (, alias_link) checkExpire; /* Link statistics */ int icmpLinkCount; int udpLinkCount; @@ -103,12 +105,8 @@ struct libalias { int fragmentIdLinkCount; int fragmentPtrLinkCount; int sockCount; - /* Index to chain of link table being inspected for old links */ - int cleanupIndex; /* System time in seconds for current packet */ int timeStamp; - /* Last time IncrementalCleanup() was called */ - int lastCleanupTime; /* If equal to zero, DeleteLink() * will not remove permanent links */ int deleteAllLinks; From owner-dev-commits-src-main@freebsd.org Thu Jun 10 22:26:47 2021 Return-Path: Delivered-To: dev-commits-src-main@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 54BF265495B for ; Thu, 10 Jun 2021 22:26:47 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) (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 4G1JVb1kG8z4hv2 for ; Thu, 10 Jun 2021 22:26:46 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-yb1-xb34.google.com with SMTP id f84so1616965ybg.0 for ; Thu, 10 Jun 2021 15:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KSYbp4QbRyU5mMszLcS73ZGMAkrepLmHzPFFjr66IPI=; b=KqkiM6rptD5BZwDj6Uxq337WH6dYoxdVa1J1VGQbTxGd2W29Gpt30igIhmaQwDsXM9 Wn19Ww650bW4mYQGiiuS1RizlN+yPSLEhSsHofUle3Jn9r9JFgQXYsxXRROAxT/UQ++3 YnNrP/orQQ2OhocLSlp8ThVKsxtrwKh3y6+Sc= 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=KSYbp4QbRyU5mMszLcS73ZGMAkrepLmHzPFFjr66IPI=; b=Iz4Xlbp/CJ0n6zpJE7XkjXt7esdz494XWDklUmqT/Tmg2tA8bTJ6fvIkEgQI7mceuH ZDom+H0zZVKymZ1TSQYtvlMoH0j/AlT1UJ0EuEJDd+62cMm4rvO4Caw+QiwpOs6KG694 jjXI6pE2sgixamf2lXOy8sQVKJ3BVSLm/5bG4iO2YyqzJDrIAwL6GR5mSWpDDOozMaug +KmfTc1HLntiR1dZYeNEDHI+brCh0upIaKB2I0kGdMm+SOtK/Wl4xrCLr/CHK27IHiUA vhtMIkzc4iufRU1F/WgzTdXpvjp3aBfZEw+zKggU3gu6RNI5pIYa38AdWxzAfmdA0z3o qMEg== X-Gm-Message-State: AOAM530MhAcn3aYMevFOgtmF0BHNd+YO5dumX/u1tP0RvLibpgJQpXHC +xSxpeNqnP/4gD1i7087ioOkP08uMokaM4Z+Ph7xRw== X-Google-Smtp-Source: ABdhPJwDxCCOCN8Hk9e1NCAlGjqMTkzx+kfP8Fj9e+QfMNjlXHyegC0PV1SxpwsBYQ3FqhcACBWmU7s/pnOJRm4ehp8= X-Received: by 2002:a25:9809:: with SMTP id a9mr1651869ybo.330.1623364005900; Thu, 10 Jun 2021 15:26:45 -0700 (PDT) MIME-Version: 1.0 References: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> In-Reply-To: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> From: Kevin Bowling Date: Thu, 10 Jun 2021 15:26:34 -0700 Message-ID: Subject: Re: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning To: rgrimes@freebsd.org Cc: "" , Warner Losh , Warner Losh , dev-commits-src-main@freebsd.org, src-committers X-Rspamd-Queue-Id: 4G1JVb1kG8z4hv2 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" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 22:26:47 -0000 Empirically that=E2=80=99s not how FreeBSD works these days and it=E2=80=99= s at least an unsustainable mantra as entities come and go (see TCP as a not too controversial example). Checking in a regression implies some level of ownership to revert it if identified quickly. Making a stepwise improvement or partial improvement and halting further work needs to be a valid contribution in a volunteer project. On Thu, Jun 10, 2021 at 12:49 PM Rodney W. Grimes wrote: > > On Thu, Jun 10, 2021 at 5:46 AM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=3Df4d987cd137cb2d0d54a3e35d9258ca= 7c175d291 > > > > > > > > commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > Author: Warner Losh > > > > AuthorDate: 2021-06-10 00:10:12 +0000 > > > > Commit: Warner Losh > > > > CommitDate: 2021-06-10 00:10:52 +0000 > > > > > > > > mk: WITH_FOO=3Dno now generates a warning > > > > > > First off thank you, this may stop some head scratching! > > > > > > But what about WITHOUT_foo=3Dno the symetrical mistake? > > > I see bdrewey raised this in the review, but it was dismissed > > > using the argument that some languages, spanish specifically, > > > allow double negatives. This is computers engineering, > > > and in that field of science double negatives are clearly > > > defined and understood, so using an argument of a language > > > that simply does not apply to the field, IMHO, is an arguement > > > of low standing. > > > > > > > It's not the same, and I'm not solving that error because the mapping > > is ambiguous. I've seen a lot more instances of people using > > WITHOUT_FOO=3Dno unironically because it makes sense to the > > person doing it. I disagree it's not a language issue, because > > language is involved here: how do we assign semantic meaning > > is unclear and I have no desire to get involved in what I clearly > > view as a quagmire. > > > > > > > Also I do not believe =3D=3D is a case insensitive operation > > > so this code fails for NO, No, and nO(sic). > > > > > > > Also true. Again, this isn't perfect. I have no desire to make it > > perfect, because the list isn't finite. > > > > If you'd like to own this issue, feel free, but it's not something I > > wish to pursue further. > > You touched it, you own it. > > > Warner > > > > > > > Regards, > > > Rod > > > > > > > > Many people are used to gnu configure's behavior of changing > > > > --with-foo=3Dno to --without-foo. At the same time, several fol= ks > have > > > > WITH_FOO=3Dno in their config files to enable this ironic form = of > the > > > > option because of an old meme from IRC, a mailing list or the > forums > > > (I > > > > forget which). Add a warning to allow to alert people w/o > breaking > > > POLA. > > > > > > > > Reviewed by: allanjude, bdrewery, manu > > > > MFC After: 2 weeks > > > > Sponsored by: Netflix > > > > Differential Revision: https://reviews.freebsd.org/D30684 > > > > --- > > > > share/mk/bsd.mkopt.mk | 6 ++++++ > > > > 1 file changed, 6 insertions(+) > > > > > > > > diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk > > > > index 5a9cf1b2f1be..98d23dd46c2a 100644 > > > > --- a/share/mk/bsd.mkopt.mk > > > > +++ b/share/mk/bsd.mkopt.mk > > > > @@ -36,6 +36,9 @@ > > > > # > > > > .for var in ${__DEFAULT_YES_OPTIONS} > > > > .if !defined(MK_${var}) > > > > +.if defined(WITH_${var}) && ${WITH_${var}} =3D=3D "no" > > > > +.warning "Use WITHOUT_${var}=3D1 insetad of WITH_${var}=3Dno" > > > > +.endif > > > > .if defined(WITHOUT_${var}) # WITHOUT always wins > > > > MK_${var}:=3D no > > > > .else > > > > @@ -54,6 +57,9 @@ MK_${var}:=3D yes > > > > # > > > > .for var in ${__DEFAULT_NO_OPTIONS} > > > > .if !defined(MK_${var}) > > > > +.if defined(WITH_${var}) && ${WITH_${var}} =3D=3D "no" > > > > +.warning "Use WITHOUT_${var}=3D1 insetad of WITH_${var}=3Dno" > > > > +.endif > > > > .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT > always > > > wins > > > > MK_${var}:=3D yes > > > > .else > > > > > > > > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > > > -- > Rod Grimes > rgrimes@freebsd.org > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to " > dev-commits-src-main-unsubscribe@freebsd.org" > From owner-dev-commits-src-main@freebsd.org Thu Jun 10 23:36:58 2021 Return-Path: Delivered-To: dev-commits-src-main@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 3463C6552AC; Thu, 10 Jun 2021 23:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1L3Z0tXxz4sxQ; Thu, 10 Jun 2021 23:36:58 +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 02CE7186D4; Thu, 10 Jun 2021 23:36:58 +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 15ANavYw055262; Thu, 10 Jun 2021 23:36:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ANav1V055261; Thu, 10 Jun 2021 23:36:57 GMT (envelope-from git) Date: Thu, 10 Jun 2021 23:36:57 GMT Message-Id: <202106102336.15ANav1V055261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 47ddbfae278b - main - zfs: unbreak build with clang 12 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47ddbfae278b617a01976db667b8f4b4c4155755 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 23:36:58 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=47ddbfae278b617a01976db667b8f4b4c4155755 commit 47ddbfae278b617a01976db667b8f4b4c4155755 Author: Martin Matuska AuthorDate: 2021-06-10 23:31:56 +0000 Commit: Martin Matuska CommitDate: 2021-06-10 23:34:46 +0000 zfs: unbreak build with clang 12 Change -Wno-error-atomic-alignment to -Wno-error=atomic-alignment in the Makefile of libspl. Reported by: Ed Maste Fix by: Alexander Richardson --- cddl/lib/libspl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index f565683fba4e..59e0a7c51834 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -41,6 +41,6 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h -CFLAGS.atomic.c+= -Wno-error-atomic-alignment +CFLAGS.atomic.c+= -Wno-error=atomic-alignment .include From owner-dev-commits-src-main@freebsd.org Thu Jun 10 23:56:22 2021 Return-Path: Delivered-To: dev-commits-src-main@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 99D96655BEF; Thu, 10 Jun 2021 23:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1LTy3gcfz4tn1; Thu, 10 Jun 2021 23:56:22 +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 66EA018678; Thu, 10 Jun 2021 23:56:22 +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 15ANuMT8081685; Thu, 10 Jun 2021 23:56:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ANuM25081684; Thu, 10 Jun 2021 23:56:22 GMT (envelope-from git) Date: Thu, 10 Jun 2021 23:56:22 GMT Message-Id: <202106102356.15ANuM25081684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: ab6d05336caa - main - tests/sys/netpfil: Move common tests out from behind MK_PF. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab6d05336caaa10ae315f81534851e3764a8660c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 23:56:22 -0000 The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6d05336caaa10ae315f81534851e3764a8660c commit ab6d05336caaa10ae315f81534851e3764a8660c Author: Brad Davis AuthorDate: 2021-06-10 23:01:53 +0000 Commit: Brad Davis CommitDate: 2021-06-10 23:56:01 +0000 tests/sys/netpfil: Move common tests out from behind MK_PF. Approved by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/Makefile b/tests/sys/netpfil/Makefile index b6c90f2b3c86..89629b8c3bd2 100644 --- a/tests/sys/netpfil/Makefile +++ b/tests/sys/netpfil/Makefile @@ -3,10 +3,10 @@ .include TESTSDIR= ${TESTSBASE}/sys/netpfil +TESTS_SUBDIRS+= common .if ${MK_PF} != "no" -TESTS_SUBDIRS+= pf \ - common +TESTS_SUBDIRS+= pf .endif .include From owner-dev-commits-src-main@freebsd.org Fri Jun 11 00:42:23 2021 Return-Path: Delivered-To: dev-commits-src-main@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 521C265621A for ; Fri, 11 Jun 2021 00:42:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 4G1MW31KkRz3G08 for ; Fri, 11 Jun 2021 00:42:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x832.google.com with SMTP id z4so1381315qts.4 for ; Thu, 10 Jun 2021 17:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QBC1BXzN+RnfeQZGQNAki7HsWfbSxbn4tIzsy8vo/b8=; b=EvOrbsFp+t1pXLUiOfSXg57ElGQPdvEfRBoL35zVsdE8fh3oz8f7Zleeq5E+5Z+g7y oMK8oVsEu+EJu9x1vilsTa6AsuLObGUt4j3X5+qRpevsj0aeJmUCVweI0tiLqRVL7sC+ a8angFaOu/zkFip4sofmSwmN31K61OtAqdZMgEjSoVh3L5/wEZvUWKKqeO+92mhxWMzx TvKQX36rk4SkXfeKG0PnugZrendNhplTahNJlaBdvf19D8OUbM2ZO//UYmb6YFpGowuF 1ql3dj8aPsDdhz5Dh01NB4xivbNa2ocfWlEpjndryHxmmjW9M6AC8yahxk0rhKIwf/Fk xZrQ== 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=QBC1BXzN+RnfeQZGQNAki7HsWfbSxbn4tIzsy8vo/b8=; b=Uq74moRhLsb2O+14qbrT6yRt333HuJ/IisWLHkdXnYBf0mN/bQO7zOMfYwhTKQ6B33 RrGBQAdouHsyqikbxue/KTdtxs5NKAL8ldLnOqQ8jMw9DQdBRkh4RFLAz4z+ISlfPgk3 7eHLvj0164JM3/BWIuiqQjuvKbjVc9RqwEcuLQatPz4HG1c73mJOJJj954Fxjws7CY/u QcIdHRV+yr6Jtn+2Nf7xVcJ36FlHvZwHZY6a9hcIT9DmmOxwH2WOPgD1iI7wal27UCV3 6913INk1enALQj2PR2IOlyi1IBbC/e1AQQcE/i0OfYpxtum6q0j1U6l06jJub0i0xz8+ Sctg== X-Gm-Message-State: AOAM533Kc7YzmBPKPnyym7+G7DZfZQXjTfEAqstRsR7cn29ZxolEx+96 PYnysHw4wjiE+wLrvTcIQzGqP9Bf9mZkdIWZ8cx4Jw== X-Google-Smtp-Source: ABdhPJz/uR2svhYXLldhLJfIXzOsE4e5sap/U9oIuEKp2g2rZaQK4QUQ4mYxmBY/kY4sIgP+stzgoWaYd1Phv1pikE8= X-Received: by 2002:ac8:6906:: with SMTP id e6mr1562144qtr.73.1623372141862; Thu, 10 Jun 2021 17:42:21 -0700 (PDT) MIME-Version: 1.0 References: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> In-Reply-To: <202106101948.15AJmlgS021046@gndrsh.dnsmgr.net> From: Warner Losh Date: Thu, 10 Jun 2021 18:42:11 -0600 Message-ID: Subject: Re: git: f4d987cd137c - main - mk: WITH_FOO=no now generates a warning To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4G1MW31KkRz3G08 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-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 00:42:23 -0000 On Thu, Jun 10, 2021 at 1:48 PM Rodney W. Grimes wrote: > > On Thu, Jun 10, 2021 at 5:46 AM Rodney W. Grimes < > freebsd@gndrsh.dnsmgr.net> > > wrote: > > > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > > > > > commit f4d987cd137cb2d0d54a3e35d9258ca7c175d291 > > > > Author: Warner Losh > > > > AuthorDate: 2021-06-10 00:10:12 +0000 > > > > Commit: Warner Losh > > > > CommitDate: 2021-06-10 00:10:52 +0000 > > > > > > > > mk: WITH_FOO=no now generates a warning > > > > > > First off thank you, this may stop some head scratching! > > > > > > But what about WITHOUT_foo=no the symetrical mistake? > > > I see bdrewey raised this in the review, but it was dismissed > > > using the argument that some languages, spanish specifically, > > > allow double negatives. This is computers engineering, > > > and in that field of science double negatives are clearly > > > defined and understood, so using an argument of a language > > > that simply does not apply to the field, IMHO, is an arguement > > > of low standing. > > > > > > > It's not the same, and I'm not solving that error because the mapping > > is ambiguous. I've seen a lot more instances of people using > > WITHOUT_FOO=no unironically because it makes sense to the > > person doing it. I disagree it's not a language issue, because > > language is involved here: how do we assign semantic meaning > > is unclear and I have no desire to get involved in what I clearly > > view as a quagmire. > > > > > > > Also I do not believe == is a case insensitive operation > > > so this code fails for NO, No, and nO(sic). > > > > > > > Also true. Again, this isn't perfect. I have no desire to make it > > perfect, because the list isn't finite. > > > > If you'd like to own this issue, feel free, but it's not something I > > wish to pursue further. > > You touched it, you own it. > % ./configure --without-fred=no configure: error: invalid package name: fred=no I accomplished what I set out to accomplish. We've never, ever, fixed all the bugs / issues pointed out by reviewers in this project for adjacent issues or code. Otherwise, I'd still only about half way through bde's feedback... Warner > > Warner > > > > > > > Regards, > > > Rod > > > > > > > > Many people are used to gnu configure's behavior of changing > > > > --with-foo=no to --without-foo. At the same time, several folks > have > > > > WITH_FOO=no in their config files to enable this ironic form of > the > > > > option because of an old meme from IRC, a mailing list or the > forums > > > (I > > > > forget which). Add a warning to allow to alert people w/o > breaking > > > POLA. > > > > > > > > Reviewed by: allanjude, bdrewery, manu > > > > MFC After: 2 weeks > > > > Sponsored by: Netflix > > > > Differential Revision: https://reviews.freebsd.org/D30684 > > > > --- > > > > share/mk/bsd.mkopt.mk | 6 ++++++ > > > > 1 file changed, 6 insertions(+) > > > > > > > > diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk > > > > index 5a9cf1b2f1be..98d23dd46c2a 100644 > > > > --- a/share/mk/bsd.mkopt.mk > > > > +++ b/share/mk/bsd.mkopt.mk > > > > @@ -36,6 +36,9 @@ > > > > # > > > > .for var in ${__DEFAULT_YES_OPTIONS} > > > > .if !defined(MK_${var}) > > > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > > > +.endif > > > > .if defined(WITHOUT_${var}) # WITHOUT always wins > > > > MK_${var}:= no > > > > .else > > > > @@ -54,6 +57,9 @@ MK_${var}:= yes > > > > # > > > > .for var in ${__DEFAULT_NO_OPTIONS} > > > > .if !defined(MK_${var}) > > > > +.if defined(WITH_${var}) && ${WITH_${var}} == "no" > > > > +.warning "Use WITHOUT_${var}=1 insetad of WITH_${var}=no" > > > > +.endif > > > > .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT > always > > > wins > > > > MK_${var}:= yes > > > > .else > > > > > > > > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-dev-commits-src-main@freebsd.org Fri Jun 11 01:02:34 2021 Return-Path: Delivered-To: dev-commits-src-main@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 993136565E7; Fri, 11 Jun 2021 01:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1MyL3jxDz3Hgf; Fri, 11 Jun 2021 01:02:34 +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 683A019ACA; Fri, 11 Jun 2021 01:02:34 +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 15B12YYO074503; Fri, 11 Jun 2021 01:02:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15B12YbP074502; Fri, 11 Jun 2021 01:02:34 GMT (envelope-from git) Date: Fri, 11 Jun 2021 01:02:34 GMT Message-Id: <202106110102.15B12YbP074502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 07d72396f8fb - main - tools: Remove obsolete svn information. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07d72396f8fba2d1a253149436c3f76c49e6190d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 01:02:34 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07d72396f8fba2d1a253149436c3f76c49e6190d commit 07d72396f8fba2d1a253149436c3f76c49e6190d Author: Warner Losh AuthorDate: 2021-06-11 00:50:46 +0000 Commit: Warner Losh CommitDate: 2021-06-11 01:02:22 +0000 tools: Remove obsolete svn information. Reviewed by: jhb@ Differential Revision: https://reviews.freebsd.org/D30720 Sponsored by: Netflix --- tools/tools/git/HOWTO | 53 +---------- tools/tools/git/git-svn-init | 211 ----------------------------------------- tools/tools/git/git-svn-rebase | 57 ----------- tools/tools/git/importgit | 182 ----------------------------------- 4 files changed, 1 insertion(+), 502 deletions(-) diff --git a/tools/tools/git/HOWTO b/tools/tools/git/HOWTO index 3e95264789f0..160696c4d236 100644 --- a/tools/tools/git/HOWTO +++ b/tools/tools/git/HOWTO @@ -1,7 +1,7 @@ # $FreeBSD$ This directory contains tools intended to help committers use git when -interacting with standard FreeBSD project resources like Differential or svn. +interacting with standard FreeBSD project resources like Differential. I. arcgit @@ -113,54 +113,3 @@ commits. The intended workflow is: At this point, you are ready to commit your changes to head. The importgit script can be used to import your commits directly into git. - -II. importgit - -importgit is a script that can take a series of commits from git and commit them -to a svn repository. The script uses the git commit messages for the svn commit -message, which allows importgit to be fully automated. This does mean that once -you start importgit, it will start commit things to svn without giving any -further chance to sanity check what it's doing. - -importgit only supports importing commits that add or modify files. It does not -support importing commits that rename or delete files, to ensure that git's -rename detection heuristics do not introduce an error in the import process. -importgit also does not support importing merge commits. Only linear history -can be imported into svn. - -importgit must be run from a clean subversion checkout. You should ensure that -the working tree is up-to-date with "svn up" before running importgit. -importgit will run svn directly, so make sure that your ssh-agent is running -and has your ssh key loaded already. Run importgit as follows: - - $ importgit -r D1~..D2 -g /path/to/git/repo - -This will import every commit between D1 and D2, including both D1 and D2. The -invocation is very similar to the invocation given to arcgit but there is an -important point to note. When you rebased your commits as you followed steps 4 -and 5, the commit hashes of all of your commits changed, including C1 and C2. -You must go back and find the new commit hashes of your commits to pass to -importgit. Passing -r C1~..C2 would import your commits as they were *before* -your code review fixes were applied. - -III. git-svn-rebase - -git-svn-rebase is a script that helps you keep current when using git -plus subversion as outline in https://wiki.freebsd.org/GitWorkflow/GitSvn -since it's otherwise a pain to have many branches active. It will rebase -those branches that haven't been merged yet. Some tweaking may be needed -if you have other, weird branches in your tree (including any stable -branches). To run it just cd into the git subversion tree somewhere and -type - $ git-svn-rebase -and it will do its thing and leave the tree on the master branch. - -Your tree must be clean to start this, and while it tries to catch -some failures, not all of them have been allowed for. - -IV. git-svn-init -git-svn-init is a script that initializes the right git-svn connection as -outlined in https://wiki.freebsd.org/GitWorkflow/GitSvn. It would be a precursor -to the script git-svn-rebase. The script contains help, but generally you can -run the script with no arguments and it will attempt to set up both src and -ports repositories. diff --git a/tools/tools/git/git-svn-init b/tools/tools/git/git-svn-init deleted file mode 100755 index 3069514947f8..000000000000 --- a/tools/tools/git/git-svn-init +++ /dev/null @@ -1,211 +0,0 @@ -#!/bin/sh - -# $FreeBSD$ - -# SPDX-License-Identifier: BSD-2-Clause-FreeBSD -# -# Copyright(c) 2018 Intel Corporation. -# -# 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. - -# This is the codified version of what was/is on the wiki page for using git in -# your workflow. It sets up proper repositories, with the correct remotes. - -# Environment variables which can be overridden if desired. Not worth -# parameterizing them. -GIT_IN_PATH=$(which git) -GIT=${GIT-${GIT_IN_PATH}} - -GIT_DOCS_REPO=${GIT_DOCS_REPO-git://github.com/freebsd/freebsd-doc.git} -GIT_SVN_DOCS_ROOT_URI=${GIT_SVN_DOCS_ROOT_URI-svn.freebsd.org/doc} -GIT_SVN_DOCS_URI=${GIV_SVN_DOCS_URI-repo.freebsd.org/doc} - -GIT_PORTS_REPO=${GIT_PORTS_REPO-git://github.com/freebsd/freebsd-ports.git} -GIT_SVN_PORTS_ROOT_URI=${GIT_SVN_PORTS_ROOT_URI-svn.freebsd.org/ports} -GIT_SVN_PORTS_URI=${GIT_SVN_PORTS_URI-repo.freebsd.org/ports} - -GIT_SRC_REPO=${GIT_SRC_REPO-git://github.com/freebsd/freebsd.git} -GIT_SVN_SRC_ROOT_URI=${GIT_SVN_SRC_ROOT_URI-svn.freebsd.org/base} -GIT_SVN_SRC_URI=${GIT_SVN_SRC_URI-repo.freebsd.org/base} - -GIT_SVN_DOCS_PUSH_URI=$GIT_SVN_DOCS_URI -GIT_SVN_PORTS_PUSH_URI=$GIT_SVN_PORTS_URI -GIT_SVN_SRC_PUSH_URI=$GIT_SVN_SRC_URI - -usage() -{ - cat < -# -# 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. - -# -# simple script to keep all my branches up to date while tracking -# FreeBSD (or any upstream svn source) with git. Run it often, and it -# will rebase all the branches so they don't get too stale. -# Takes no args, and acts goofy if you have really old branches -# which is why stable/* and mfc* are excluded. Caution to should be taken -# when using this. -# - -FAIL= -echo ----------------- Checkout master for svn rebase ------------ -git checkout master -echo ----------------- Rebasing our master to svn upstream ------------ -git svn rebase -for i in $(git branch --no-merge | grep -v stable/ | grep -v mfc); do - echo ----------------- Rebasing $i to the tip of master ------------ - git rebase master $i || { - echo "****************** REBASE OF $i FAILED, ABORTING *****************" - FAIL="$FAIL $i" - git rebase --abort - } -done -echo ----------------- Checkout out master again ------------ -git checkout master -git branch -if [ -n "$FAIL" ]; then - echo Failed branches: $FAIL -fi diff --git a/tools/tools/git/importgit b/tools/tools/git/importgit deleted file mode 100755 index 5149f2d9e157..000000000000 --- a/tools/tools/git/importgit +++ /dev/null @@ -1,182 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2015 Ryan Stone. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ - -usage() -{ - echo "Usage: importgit <-c commit | -r c1..c2> -g /path/to/git/repo [-n]" >&2 -} - -error() -{ - local print_usage - - if [ "$1" = "-u" ] - then - shift - print_usage=1 - else - print_usage= - fi - - echo "$@" >&2 - if [ -n "$print_usage" ] - then - usage - fi - exit 1 -} - -unset git_repo range commit dry_run - -while getopts ":c:g:nr:" o -do - case "$o" in - c) - range="${OPTARG}~..${OPTARG}" - ;; - g) - git_repo=$OPTARG - ;; - n) - dry_run=1 - ;; - r) - range=$OPTARG - ;; - *) - error -u "Unrecognized argument '-$OPTARG'" - esac -done - -shift $((OPTIND - 1)) -OPTIND=1 - -if [ -n "$1" ] -then - error -u "Unrecognized argument $1" -fi - -if [ -z "$range" ] -then - error -u "-c or -r argument is mandatory" -fi - -if ! echo "$range" | egrep -qs '^[^.]+\.\.[^.]*$' -then - error -u "$range is not a range of commits. Did you mean '-c $range'?" -fi - -if [ -z "$git_repo" ] -then - error -u "-g argument is mandatory" -fi - -if ! type git > /dev/null 2> /dev/null -then - error "Install devel/git first" -fi - -GIT="git -C $git_repo" - -if ! $GIT rev-parse --git-dir 2> /dev/null > /dev/null -then - error "$git_repo does not seem to be a git repo" -fi - -if ! type svn > /dev/null 2> /dev/null -then - error "Install devel/subversion first" -fi - -if [ -n "$(svn status)" ] -then - error "Working tree is not clean" -fi - -if ! svn --non-interactive ls > /dev/null -then - error "Could not communicate with svn server. Is your ssh key loaded?" -fi - -$GIT log --format=%H $range | tail -r | while read -r commit -do - echo "Applying `$GIT show -s --oneline $commit`" - - if [ -n "$($GIT show --diff-filter=CDRTUXB $commit)" ] - then - error "Commit performed unsupported change (e.g. delete/rename)" - fi - - if [ "$($GIT show -s --format=%P $commit | wc -w)" -ne 1 ] - then - error "Cannot import merge commits" - fi - - $GIT diff --diff-filter=A --name-only \ - ${commit}~..$commit | while read -r newfile - do - if [ -f "$newfile" ] - then - error "New file $newfile already exists in tree" - fi - done - - # The previous while loop ran in a subshell, so we have to check if it - # exited with an error and bail out if so. - ret=$? - if [ "$ret" -ne 0 ] - then - exit $ret - fi - - if [ -n "$dry_run" ] - then - continue - fi - - $GIT show $commit | patch -p 1 -s || \ - error "Failed to apply patch" - - $GIT diff --diff-filter=A --name-only \ - ${commit}~..$commit | while read -r newfile - do - svn add --parents --depth=infinity $newfile || \ - error "Failed to add new file" - done - - # The previous while loop ran in a subshell, so we have to check if it - # exited with an error and bail out if so. - ret=$? - if [ "$ret" -ne 0 ] - then - exit $ret - fi - - $GIT show -s --format='%B' $commit | svn commit -F - || \ - error "Failed to commit" -done - From owner-dev-commits-src-main@freebsd.org Fri Jun 11 05:28:30 2021 Return-Path: Delivered-To: dev-commits-src-main@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 12C29658EB5; Fri, 11 Jun 2021 05:28:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1TsB033Rz3kTP; Fri, 11 Jun 2021 05:28: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 DA9E81CD63; Fri, 11 Jun 2021 05:28:29 +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 15B5STZX018760; Fri, 11 Jun 2021 05:28:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15B5STns018759; Fri, 11 Jun 2021 05:28:29 GMT (envelope-from git) Date: Fri, 11 Jun 2021 05:28:29 GMT Message-Id: <202106110528.15B5STns018759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7aa2e90176ba - main - spl: Fix gcc6 build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7aa2e90176baaca3bf4a6813defeb3c4b08cac8a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 05:28:30 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa2e90176baaca3bf4a6813defeb3c4b08cac8a commit 7aa2e90176baaca3bf4a6813defeb3c4b08cac8a Author: Warner Losh AuthorDate: 2021-06-11 03:28:52 +0000 Commit: Warner Losh CommitDate: 2021-06-11 03:28:52 +0000 spl: Fix gcc6 build -Wno-error= is only a clang flag, restrict its use to only clang. Sponsored by: Netflix --- cddl/lib/libspl/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 59e0a7c51834..0aac141301e4 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -1,9 +1,11 @@ # $FreeBSD$ +.include +.include + .PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl .PATH: ${SRCTOP}/sys/contrib/openzfs/include - LIB= spl LIBADD= PACKAGE= runtime @@ -41,6 +43,8 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +.if ${COMPILER_TYPE} == "clang" CFLAGS.atomic.c+= -Wno-error=atomic-alignment +.endif .include From owner-dev-commits-src-main@freebsd.org Fri Jun 11 08:06:09 2021 Return-Path: Delivered-To: dev-commits-src-main@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 99B1565B01B; Fri, 11 Jun 2021 08:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1YM53l7Sz3vrc; Fri, 11 Jun 2021 08:06:09 +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 698451F40A; Fri, 11 Jun 2021 08:06:09 +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 15B869VL030860; Fri, 11 Jun 2021 08:06:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15B869Cf030859; Fri, 11 Jun 2021 08:06:09 GMT (envelope-from git) Date: Fri, 11 Jun 2021 08:06:09 GMT Message-Id: <202106110806.15B869Cf030859@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: 224cf7b35b9b - main - tcp: fix compilation of IPv4-only builds 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: 224cf7b35b9bbe8d075f6004249d850c620b7855 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 08:06:09 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=224cf7b35b9bbe8d075f6004249d850c620b7855 commit 224cf7b35b9bbe8d075f6004249d850c620b7855 Author: Michael Tuexen AuthorDate: 2021-06-11 07:50:46 +0000 Commit: Michael Tuexen CommitDate: 2021-06-11 07:50:46 +0000 tcp: fix compilation of IPv4-only builds PR: 256538 Reported by: iron.udjin@gmail.com MFC after: 3 days Sponsored by: Netflix, Inc. --- sys/netinet/tcp_stacks/rack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 5227ea59ba23..6ce866b77450 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -17677,9 +17677,11 @@ send: th = rack->r_ctl.fsb.th; udp = rack->r_ctl.fsb.udp; if (udp) { +#ifdef INET6 if (isipv6) ulen = hdrlen + len - sizeof(struct ip6_hdr); else +#endif /* INET6 */ ulen = hdrlen + len - sizeof(struct ip); udp->uh_ulen = htons(ulen); } From owner-dev-commits-src-main@freebsd.org Fri Jun 11 11:08:27 2021 Return-Path: Delivered-To: dev-commits-src-main@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 59B6B65CE62; Fri, 11 Jun 2021 11:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1dPR1rs4z4kk8; Fri, 11 Jun 2021 11:08: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 23DFF2199D; Fri, 11 Jun 2021 11:08: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 15BB8RFG071726; Fri, 11 Jun 2021 11:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BB8QdB071725; Fri, 11 Jun 2021 11:08:27 GMT (envelope-from git) Date: Fri, 11 Jun 2021 11:08:27 GMT Message-Id: <202106111108.15BB8QdB071725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: a7cf31da5a29 - main - Add new USB ID to u3g(4). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7cf31da5a29a762848c367aced61910efda95c1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 11:08:27 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a7cf31da5a29a762848c367aced61910efda95c1 commit a7cf31da5a29a762848c367aced61910efda95c1 Author: Hans Petter Selasky AuthorDate: 2021-06-11 10:53:22 +0000 Commit: Hans Petter Selasky CommitDate: 2021-06-11 11:05:58 +0000 Add new USB ID to u3g(4). Submitted by: pierre-jean.gineste@nuabee.fr PR: 231909 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index fcff316d8d3a..8cc468dec880 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -245,6 +245,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(HP, HS2300, 0), U3G_DEV(HP, UN2420_QDL, 0), U3G_DEV(HP, UN2420, 0), + U3G_DEV(HP, LT4132, U3GINIT_HUAWEISCSI2), U3G_DEV(HUAWEI, E1401, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1402, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E1403, U3GINIT_HUAWEI), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 5e6a1db31650..53e074d3fd61 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2447,6 +2447,7 @@ product HP HN210E 0x811c Ethernet HN210E product HP2 C500 0x6002 PhotoSmart C500 product HP EV2200 0x1b1d ev2200 HSDPA (aka MC5720) product HP HS2300 0x1e1d hs2300 HSDPA (aka MC8775) +product HP LT4132 0xa31d lt4132 LTEHSPA+ (aka ME906s) /* HTC products */ product HTC WINMOBILE 0x00ce HTC USB Sync From owner-dev-commits-src-main@freebsd.org Fri Jun 11 13:40:41 2021 Return-Path: Delivered-To: dev-commits-src-main@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 F075E65F388; Fri, 11 Jun 2021 13:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1hn56T1mz3FMc; Fri, 11 Jun 2021 13:40:41 +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 C5C1D23B20; Fri, 11 Jun 2021 13:40:41 +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 15BDefGG077898; Fri, 11 Jun 2021 13:40:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BDefYe077897; Fri, 11 Jun 2021 13:40:41 GMT (envelope-from git) Date: Fri, 11 Jun 2021 13:40:41 GMT Message-Id: <202106111340.15BDefYe077897@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: fa3746be4203 - main - tcp: fix two bugs in new reno 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: fa3746be4203fc9a3414afb21d964eec8bad74f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 13:40:42 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3746be4203fc9a3414afb21d964eec8bad74f8 commit fa3746be4203fc9a3414afb21d964eec8bad74f8 Author: Michael Tuexen AuthorDate: 2021-06-11 13:37:39 +0000 Commit: Michael Tuexen CommitDate: 2021-06-11 13:40:34 +0000 tcp: fix two bugs in new reno * Completely initialise the CC module specific data * Use beta_ecn in case of an ECN event whenever ABE is enabled or it is requested by the stack. Reviewed by: rscheff, rrs MFC after: 3 days Sponsored by: Netflix, Inc. --- sys/netinet/cc/cc_newreno.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c index 8f8ca953169e..8f939ad70695 100644 --- a/sys/netinet/cc/cc_newreno.c +++ b/sys/netinet/cc/cc_newreno.c @@ -111,6 +111,7 @@ newreno_malloc(struct cc_var *ccv) /* NB: nreno is not zeroed, so initialise all fields. */ nreno->beta = V_newreno_beta; nreno->beta_ecn = V_newreno_beta_ecn; + nreno->newreno_flags = 0; ccv->cc_data = nreno; } @@ -254,8 +255,9 @@ newreno_cong_signal(struct cc_var *ccv, uint32_t type) * has set a flag in our newreno_flags (due to pacing) telling * us to use the lower valued back-off. */ - if (V_cc_do_abe || - (nreno && (nreno->newreno_flags & CC_NEWRENO_BETA_ECN) && (type == CC_ECN))) + if ((type == CC_ECN) && + (V_cc_do_abe || + ((nreno != NULL) && (nreno->newreno_flags & CC_NEWRENO_BETA_ECN)))) factor = beta_ecn; else factor = beta; From owner-dev-commits-src-main@freebsd.org Fri Jun 11 15:07:50 2021 Return-Path: Delivered-To: dev-commits-src-main@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 84B6D660714; Fri, 11 Jun 2021 15:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1kjf3PJhz3jRK; Fri, 11 Jun 2021 15:07:50 +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 5CCB72501B; Fri, 11 Jun 2021 15:07:50 +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 15BF7ouU090321; Fri, 11 Jun 2021 15:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BF7oRL090320; Fri, 11 Jun 2021 15:07:50 GMT (envelope-from git) Date: Fri, 11 Jun 2021 15:07:50 GMT Message-Id: <202106111507.15BF7oRL090320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 6847ea50196f - main - Improve handling of USB device re-open in the LibUSB v1.x API. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6847ea50196f1a685be408a24f01cb8d407da19c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 15:07:50 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6847ea50196f1a685be408a24f01cb8d407da19c commit 6847ea50196f1a685be408a24f01cb8d407da19c Author: Hans Petter Selasky AuthorDate: 2021-06-11 15:06:10 +0000 Commit: Hans Petter Selasky CommitDate: 2021-06-11 15:06:44 +0000 Improve handling of USB device re-open in the LibUSB v1.x API. Make sure the "device_is_gone" flag is cleared after every successful open, so that the "device_is_gone" flag doesn't persist forever. Found by: sergii.dmytruk@3mdeb.com PR: 256296 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- lib/libusb/libusb10.c | 9 +++++++++ lib/libusb/libusb10_io.c | 12 ++++++++++-- lib/libusb/libusb20.c | 5 +++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 1c45b87d8f0b..ffe0cf3f366a 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -529,6 +529,15 @@ libusb_open(libusb_device *dev, libusb_device_handle **devh) libusb_unref_device(dev); return (LIBUSB_ERROR_NO_MEM); } + + /* + * Clear the device gone flag, in case the device was opened + * after a re-attach, to allow new transaction: + */ + CTX_LOCK(ctx); + dev->device_is_gone = 0; + CTX_UNLOCK(ctx); + libusb10_add_pollfd(ctx, &dev->dev_poll, pdev, libusb20_dev_get_fd(pdev), POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM); diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c index 53f5b040436d..0e32fc31c8e0 100644 --- a/lib/libusb/libusb10_io.c +++ b/lib/libusb/libusb10_io.c @@ -165,8 +165,16 @@ libusb10_handle_events_sub(struct libusb_context *ctx, struct timeval *tv) err = libusb20_dev_process(ppdev[i]); if (err) { - /* set device is gone */ - dev->device_is_gone = 1; + /* + * When the device is opened + * set the "device_is_gone" + * flag. This prevents the + * client from submitting new + * USB transfers to a detached + * device. + */ + if (ppdev[i]->is_opened) + dev->device_is_gone = 1; /* remove USB device from polling loop */ libusb10_remove_pollfd(dev->ctx, &dev->dev_poll); diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c index 6c2bf721bea9..4323552b83ad 100644 --- a/lib/libusb/libusb20.c +++ b/lib/libusb/libusb20.c @@ -608,6 +608,11 @@ libusb20_dev_close(struct libusb20_device *pdev) pdev->is_opened = 0; + /* + * Make sure libusb20_tr_get_pointer() fails: + */ + pdev->nTransfer = 0; + /* * The following variable is only used by the libusb v0.1 * compat layer: From owner-dev-commits-src-main@freebsd.org Fri Jun 11 15:40:38 2021 Return-Path: Delivered-To: dev-commits-src-main@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 27E4D660CC8; Fri, 11 Jun 2021 15:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1lRV0QFsz3mbQ; Fri, 11 Jun 2021 15:40:38 +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 EAA84255AF; Fri, 11 Jun 2021 15:40:37 +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 15BFebi1038938; Fri, 11 Jun 2021 15:40:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BFebVe038937; Fri, 11 Jun 2021 15:40:37 GMT (envelope-from git) Date: Fri, 11 Jun 2021 15:40:37 GMT Message-Id: <202106111540.15BFebVe038937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: ba1b3e48f5be - main - tcp: Missing mfree in rack and bbr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba1b3e48f5be320f0590bc357ea53fdc3e4edc65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 15:40:38 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=ba1b3e48f5be320f0590bc357ea53fdc3e4edc65 commit ba1b3e48f5be320f0590bc357ea53fdc3e4edc65 Author: Randall Stewart AuthorDate: 2021-06-11 15:38:08 +0000 Commit: Randall Stewart CommitDate: 2021-06-11 15:38:08 +0000 tcp: Missing mfree in rack and bbr Recently (Nov) we added logic that protects against a peer negotiating a timestamp, and then not including a timestamp. This involved in the input path doing a goto done_with_input label. Now I suspect the code was cribbed from one in Rack that has to do with the SYN. This had a bug, i.e. it should have a m_freem(m) before going to the label (bbr had this missing m_freem() but rack did not). This then caused the missing m_freem to show up in both BBR and Rack. Also looking at the code referencing m->m_pkthdr.lro_nsegs later (after processing) is not a good idea, even though its only for logging. Best to copy that off before any frees can take place. Reviewed by: mtuexen Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D30727 --- sys/netinet/tcp_stacks/bbr.c | 1 + sys/netinet/tcp_stacks/rack.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index d5da2d33c18f..57abbbf694b6 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11441,6 +11441,7 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) && ((thflags & TH_RST) == 0) && (V_tcp_tolerate_missing_ts == 0)) { retval = 0; + m_freem(m); goto done_with_input; } /* diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 6ce866b77450..e5926eaf6171 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -13454,6 +13454,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, #ifdef TCP_ACCOUNTING int ack_val_set = 0xf; #endif + int nsegs; uint32_t us_cts; /* * tv passed from common code is from either M_TSTMP_LRO or @@ -13465,6 +13466,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, if (m->m_flags & M_ACKCMP) { panic("Impossible reach m has ackcmp? m:%p tp:%p", m, tp); } + nsegs = m->m_pkthdr.lro_nsegs; counter_u64_add(rack_proc_non_comp_ack, 1); thflags = th->th_flags; #ifdef TCP_ACCOUNTING @@ -13607,6 +13609,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_SYN) && (thflags & TH_FIN) && V_drop_synfin) { way_out = 4; retval = 0; + m_freem(m); goto done_with_input; } /* @@ -13641,6 +13644,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, ((thflags & TH_RST) == 0) && (V_tcp_tolerate_missing_ts == 0)) { way_out = 5; retval = 0; + m_freem(m); goto done_with_input; } @@ -13944,7 +13948,7 @@ do_output_now: way_out = 2; } done_with_input: - rack_log_doseg_done(rack, cts, nxt_pkt, did_out, way_out, max(1, m->m_pkthdr.lro_nsegs)); + rack_log_doseg_done(rack, cts, nxt_pkt, did_out, way_out, max(1, nsegs)); if (did_out) rack->r_wanted_output = 0; #ifdef INVARIANTS From owner-dev-commits-src-main@freebsd.org Fri Jun 11 15:51:52 2021 Return-Path: Delivered-To: dev-commits-src-main@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 0180F660E9C; Fri, 11 Jun 2021 15:51:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1lhR6hTPz3nmc; Fri, 11 Jun 2021 15:51:51 +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 CDFFA255F7; Fri, 11 Jun 2021 15:51:51 +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 15BFppix055404; Fri, 11 Jun 2021 15:51:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BFpp8j055403; Fri, 11 Jun 2021 15:51:51 GMT (envelope-from git) Date: Fri, 11 Jun 2021 15:51:51 GMT Message-Id: <202106111551.15BFpp8j055403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 89d5cbb82294 - main - libnv: optimize nvlist size calculation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89d5cbb82294c8624e66f920d50353057ccab14b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 15:51:52 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=89d5cbb82294c8624e66f920d50353057ccab14b commit 89d5cbb82294c8624e66f920d50353057ccab14b Author: Mariusz Zaborski AuthorDate: 2021-06-11 15:35:36 +0000 Commit: Mariusz Zaborski CommitDate: 2021-06-11 15:51:29 +0000 libnv: optimize nvlist size calculation If we had a multiple nvlist, during nvlist_pack, we calculated the size of every nvlist separately. For example, if we had a nvlist with three nodes each containing another (A contains B, and B contains C), we first calculated the size of nvlist A (which contains B, C), then we calculate the size of B (which contains C, notice that we already did the calculation of B, when we calculate A), and finally C. This means that this calculation was O(N!). This was done because each time we pack nvlist, we have to put its size in the header (the separate header for A, B, and C). To not break the ABI and to reduce the complexity of nvlist_size, instead of calculating the nvlist size when requested, we track the size of each nvlist. Reported by: pjd, kp Tested by: kp --- sys/contrib/libnv/nvlist.c | 124 +++++++++++++++++++-------------------------- 1 file changed, 53 insertions(+), 71 deletions(-) diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 311325d822ce..31ab62abeb67 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -99,6 +99,7 @@ struct nvlist { int nvl_magic; int nvl_error; int nvl_flags; + size_t nvl_datasize; nvpair_t *nvl_parent; nvpair_t *nvl_array_next; struct nvl_head nvl_head; @@ -139,6 +140,7 @@ nvlist_create(int flags) nvl->nvl_flags = flags; nvl->nvl_parent = NULL; nvl->nvl_array_next = NULL; + nvl->nvl_datasize = sizeof(struct nvlist_header); TAILQ_INIT(&nvl->nvl_head); nvl->nvl_magic = NVLIST_MAGIC; @@ -247,6 +249,51 @@ nvlist_set_array_next(nvlist_t *nvl, nvpair_t *ele) nvl->nvl_array_next = ele; } +static void +nvlist_update_size(nvlist_t *nvl, nvpair_t *new, ssize_t mul) +{ + ssize_t size; + size_t nitems; + const nvlist_t *nvlistnew; + const nvlist_t * const *nvlarray; + nvlist_t *parent; + unsigned int ii; + + NVLIST_ASSERT(nvl); + NVPAIR_ASSERT(new); + PJDLOG_ASSERT(mul == 1 || mul == -1); + + size = nvpair_header_size(); + size += strlen(nvpair_name(new)) + 1; + + if (nvpair_type(new) == NV_TYPE_NVLIST) { + nvlistnew = nvpair_get_nvlist(new); + size += nvlistnew->nvl_datasize; + size += nvpair_header_size() + 1; + } else if (nvpair_type(new) == NV_TYPE_NVLIST_ARRAY) { + nvlarray = nvpair_get_nvlist_array(new, &nitems); + PJDLOG_ASSERT(nitems > 0); + + size += (nvpair_header_size() + 1) * nitems; + for (ii = 0; ii < nitems; ii++) { + PJDLOG_ASSERT(nvlarray[ii]->nvl_error == 0); + size += nvlarray[ii]->nvl_datasize; + } + } else { + size += nvpair_size(new); + } + + size *= mul; + + nvl->nvl_datasize += size; + + parent = nvl; + while ((parent = __DECONST(nvlist_t *, + nvlist_get_parent(parent, NULL))) != NULL) { + parent->nvl_datasize += size; + } +} + nvpair_t * nvlist_get_array_next_nvpair(nvlist_t *nvl) { @@ -640,78 +687,8 @@ nvlist_fdump(const nvlist_t *nvl, FILE *fp) size_t nvlist_size(const nvlist_t *nvl) { - const nvlist_t *tmpnvl; - const nvlist_t * const *nvlarray; - const nvpair_t *nvp, *tmpnvp; - void *cookie; - size_t size, nitems; - unsigned int ii; - - NVLIST_ASSERT(nvl); - PJDLOG_ASSERT(nvl->nvl_error == 0); - size = sizeof(struct nvlist_header); - nvp = nvlist_first_nvpair(nvl); - while (nvp != NULL) { - size += nvpair_header_size(); - size += strlen(nvpair_name(nvp)) + 1; - if (nvpair_type(nvp) == NV_TYPE_NVLIST) { - size += sizeof(struct nvlist_header); - size += nvpair_header_size() + 1; - tmpnvl = nvpair_get_nvlist(nvp); - PJDLOG_ASSERT(tmpnvl->nvl_error == 0); - tmpnvp = nvlist_first_nvpair(tmpnvl); - if (tmpnvp != NULL) { - nvl = tmpnvl; - nvp = tmpnvp; - continue; - } - } else if (nvpair_type(nvp) == NV_TYPE_NVLIST_ARRAY) { - nvlarray = nvpair_get_nvlist_array(nvp, &nitems); - PJDLOG_ASSERT(nitems > 0); - - size += (nvpair_header_size() + 1) * nitems; - size += sizeof(struct nvlist_header) * nitems; - - tmpnvl = NULL; - tmpnvp = NULL; - for (ii = 0; ii < nitems; ii++) { - PJDLOG_ASSERT(nvlarray[ii]->nvl_error == 0); - tmpnvp = nvlist_first_nvpair(nvlarray[ii]); - if (tmpnvp != NULL) { - tmpnvl = nvlarray[ii]; - break; - } - } - if (tmpnvp != NULL) { - nvp = tmpnvp; - nvl = tmpnvl; - continue; - } - - } else { - size += nvpair_size(nvp); - } - - while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - do { - cookie = NULL; - nvl = nvlist_get_pararr(nvl, &cookie); - if (nvl == NULL) - goto out; - if (nvlist_in_array(nvl) && cookie == NULL) { - nvp = nvlist_first_nvpair(nvl); - } else { - nvp = cookie; - } - } while (nvp == NULL); - if (nvlist_in_array(nvl) && cookie == NULL) - break; - } - } - -out: - return (size); + return (nvl->nvl_datasize); } #ifndef _KERNEL @@ -1483,6 +1460,7 @@ nvlist_add_nvpair(nvlist_t *nvl, const nvpair_t *nvp) } nvpair_insert(&nvl->nvl_head, newnvp, nvl); + nvlist_update_size(nvl, newnvp, 1); } void @@ -1631,10 +1609,12 @@ nvlist_append_##type##_array(nvlist_t *nvl, const char *name, vtype value)\ nvlist_add_##type##_array(nvl, name, &value, 1); \ return; \ } \ + nvlist_update_size(nvl, nvp, -1); \ if (nvpair_append_##type##_array(nvp, value) == -1) { \ nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); \ ERRNO_SET(nvl->nvl_error); \ } \ + nvlist_update_size(nvl, nvp, 1); \ } NVLIST_APPEND_ARRAY(const bool, bool, BOOL) @@ -1669,6 +1649,7 @@ nvlist_move_nvpair(nvlist_t *nvl, nvpair_t *nvp) } nvpair_insert(&nvl->nvl_head, nvp, nvl); + nvlist_update_size(nvl, nvp, 1); return (true); } @@ -2020,6 +2001,7 @@ nvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *nvp) PJDLOG_ASSERT(nvpair_nvlist(nvp) == nvl); nvpair_remove(&nvl->nvl_head, nvp, nvl); + nvlist_update_size(nvl, nvp, -1); } void From owner-dev-commits-src-main@freebsd.org Fri Jun 11 16:54:27 2021 Return-Path: Delivered-To: dev-commits-src-main@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 43F15661B03; Fri, 11 Jun 2021 16:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1n4g1Mx7z3sM0; Fri, 11 Jun 2021 16:54: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 1733A26699; Fri, 11 Jun 2021 16:54: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 15BGsRqT035568; Fri, 11 Jun 2021 16:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BGsQNi035567; Fri, 11 Jun 2021 16:54:26 GMT (envelope-from git) Date: Fri, 11 Jun 2021 16:54:26 GMT Message-Id: <202106111654.15BGsQNi035567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ab6145c97683 - main - style: tweak tab after #define advice MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab6145c976833e4363f430143a16451b57cbf621 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 16:54:27 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6145c976833e4363f430143a16451b57cbf621 commit ab6145c976833e4363f430143a16451b57cbf621 Author: Warner Losh AuthorDate: 2021-06-11 16:33:04 +0000 Commit: Warner Losh CommitDate: 2021-06-11 16:54:06 +0000 style: tweak tab after #define advice Once upon a time, #define was cultural thing. However, even when it was promulgated, it was a minority usage. 20 years ago the split was 30k/69k (tab/space) and today the split is 80k/546k (tab/space). Update guidance to allow either with the usual suggestion to be consistent within a file. Reviewed by: sef, allenjude, 0mp (prior rev), jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30254 --- share/man/man9/style.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 10ca64cde817..9744b1c11a45 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -215,9 +215,9 @@ macros (ones that have side effects), and the names of macros for manifest constants, are all in uppercase. The expansions of expression-like macros are either a single token or have outer parentheses. -Put a single tab character between the +Put a single space or tab character between the .Ic #define -and the macro name. +and the macro name, but be consistent within a file. If a macro is an inline expansion of a function, the function name is all in lowercase and the macro has the same name all in uppercase. .\" XXX the above conflicts with ANSI style where the names are the From owner-dev-commits-src-main@freebsd.org Fri Jun 11 16:54:28 2021 Return-Path: Delivered-To: dev-commits-src-main@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 723AB661A94; Fri, 11 Jun 2021 16:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1n4h2cB6z3sXH; Fri, 11 Jun 2021 16:54:28 +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 39FC6265FB; Fri, 11 Jun 2021 16:54:28 +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 15BGsSkh035592; Fri, 11 Jun 2021 16:54:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BGsS1u035591; Fri, 11 Jun 2021 16:54:28 GMT (envelope-from git) Date: Fri, 11 Jun 2021 16:54:28 GMT Message-Id: <202106111654.15BGsS1u035591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a3238e92d704 - main - style: Relax 80 column rule MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3238e92d704e84e70cc696a1cd2219fa4e4aa9e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 16:54:28 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a3238e92d704e84e70cc696a1cd2219fa4e4aa9e commit a3238e92d704e84e70cc696a1cd2219fa4e4aa9e Author: Warner Losh AuthorDate: 2021-06-11 16:37:36 +0000 Commit: Warner Losh CommitDate: 2021-06-11 16:54:06 +0000 style: Relax 80 column rule Note that the 80 column rule has been relaxed for some time when things are clearer when a little longer. Add in that things that people grep for, such as error messages, shouldn't be broken up which is the most common reason people exceed 80 columns intentionally. Reviewed by: jhb, domagoj.stolfa@gmail.com Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30255 --- share/man/man9/style.9 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 9744b1c11a45..77c8dbe8e7d7 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -36,6 +36,10 @@ This file specifies the preferred style for kernel source files in the .Fx source tree. It is also a guide for the preferred userland code style. +The preferred line width is 80 characters, but some exceptions are +made when a slightly longer line is clearer or easier to read. +Anything that is frequently grepped for, such as diagnostic, error or panic +messages, should not be broken up over multiple lines despite this rule. Many of the style rules are implicit in the examples. Be careful to check the examples before assuming that .Nm From owner-dev-commits-src-main@freebsd.org Fri Jun 11 18:23:48 2021 Return-Path: Delivered-To: dev-commits-src-main@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 624FA662C88; Fri, 11 Jun 2021 18:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1q3m2LJVz4TKQ; Fri, 11 Jun 2021 18:23: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 39037275E7; Fri, 11 Jun 2021 18:23: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 15BINmFI056485; Fri, 11 Jun 2021 18:23:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BINmMD056484; Fri, 11 Jun 2021 18:23:48 GMT (envelope-from git) Date: Fri, 11 Jun 2021 18:23:48 GMT Message-Id: <202106111823.15BINmMD056484@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: f1536bb53898 - main - tcp: remove debug output from RACK 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: f1536bb53898b12e2d19938f8fe2d04b5e5d12a6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 18:23:48 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f1536bb53898b12e2d19938f8fe2d04b5e5d12a6 commit f1536bb53898b12e2d19938f8fe2d04b5e5d12a6 Author: Michael Tuexen AuthorDate: 2021-06-11 13:43:38 +0000 Commit: Michael Tuexen CommitDate: 2021-06-11 18:23:39 +0000 tcp: remove debug output from RACK Reported by: iron.udjin@gmail.com, Marek Zarychta Reviewed by: rrs PR: 256538 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30723 Sponsored by: Netflix, Inc. --- sys/netinet/tcp_stacks/rack.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index e5926eaf6171..e37eedec460a 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -589,8 +589,6 @@ rack_set_cc_pacing(struct tcp_rack *rack) rack->rc_pacing_cc_set = 1; if (strcmp(tp->cc_algo->name, CCALGONAME_NEWRENO) != 0) { /* Not new-reno we can't play games with beta! */ - printf("cc_algo:%s is not NEWRENO:%s\n", - tp->cc_algo->name, CCALGONAME_NEWRENO); goto out; } ptr = ((struct newreno *)tp->ccv->cc_data); From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:06:55 2021 Return-Path: Delivered-To: dev-commits-src-main@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 78E5266341C; Fri, 11 Jun 2021 19:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1r1W31qPz4Ymp; Fri, 11 Jun 2021 19:06:55 +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 4C9B1282AA; Fri, 11 Jun 2021 19:06:55 +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 15BJ6tYT010292; Fri, 11 Jun 2021 19:06:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJ6thI010291; Fri, 11 Jun 2021 19:06:55 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:06:55 GMT Message-Id: <202106111906.15BJ6thI010291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2cfe870acdec - main - arm64: Add Soc audio framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cfe870acdecd35b621932f2b0cb702c48ce087a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:06:55 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2cfe870acdecd35b621932f2b0cb702c48ce087a commit 2cfe870acdecd35b621932f2b0cb702c48ce087a Author: Oleksandr Tymoshenko AuthorDate: 2021-05-13 19:09:50 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-11 19:06:04 +0000 arm64: Add Soc audio framework This framework is initial implementation of the simple-audio-card compatible audio driver framework. It provides glue for CPU/codec/aux device. Differential Revision: https://reviews.freebsd.org/D27830 --- sys/conf/files.arm64 | 8 + sys/dev/sound/fdt/audio_dai.h | 72 +++++ sys/dev/sound/fdt/audio_dai_if.m | 95 ++++++ sys/dev/sound/fdt/audio_soc.c | 546 +++++++++++++++++++++++++++++++++++ sys/dev/sound/fdt/dummy_codec.c | 127 ++++++++ sys/dev/sound/fdt/simple_amplifier.c | 206 +++++++++++++ 6 files changed, 1054 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 7b9b2583aaa1..5c819001493d 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -148,6 +148,14 @@ cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +## +## ASoC support +## +dev/sound/fdt/audio_dai_if.m optional sound fdt +dev/sound/fdt/audio_soc.c optional sound fdt +dev/sound/fdt/dummy_codec.c optional sound fdt +dev/sound/fdt/simple_amplifier.c optional sound fdt + ## ## Device drivers ## diff --git a/sys/dev/sound/fdt/audio_dai.h b/sys/dev/sound/fdt/audio_dai.h new file mode 100644 index 000000000000..f82fe9c7b838 --- /dev/null +++ b/sys/dev/sound/fdt/audio_dai.h @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2019 Oleksandr Tymoshenko + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __DAI_H__ +#define __DAI_H__ + +#define AUDIO_DAI_FORMAT_I2S 0 +#define AUDIO_DAI_FORMAT_RJ 1 +#define AUDIO_DAI_FORMAT_LJ 2 +#define AUDIO_DAI_FORMAT_DSPA 3 +#define AUDIO_DAI_FORMAT_DSPB 4 +#define AUDIO_DAI_FORMAT_AC97 5 +#define AUDIO_DAI_FORMAT_PDM 6 + +/* + * Polarity: Normal/Inverted BCLK/Frame + */ +#define AUDIO_DAI_POLARITY_NB_NF 0 +#define AUDIO_DAI_POLARITY_NB_IF 1 +#define AUDIO_DAI_POLARITY_IB_NF 2 +#define AUDIO_DAI_POLARITY_IB_IF 3 +#define AUDIO_DAI_POLARITY_INVERTED_FRAME(n) ((n) & 0x01) +#define AUDIO_DAI_POLARITY_INVERTED_BCLK(n) ((n) & 0x2) + +#define AUDIO_DAI_CLOCK_CBM_CFM 0 +#define AUDIO_DAI_CLOCK_CBS_CFM 1 +#define AUDIO_DAI_CLOCK_CBM_CFS 2 +#define AUDIO_DAI_CLOCK_CBS_CFS 3 + +#define AUDIO_DAI_CLOCK_IN 0 +#define AUDIO_DAI_CLOCK_OUT 1 + +#define AUDIO_DAI_JACK_HP 0 +#define AUDIO_DAI_JACK_MIC 1 + +/* + * Signal to audio_soc that chn_intr required + * for either recording or playback + */ +#define AUDIO_DAI_REC_INTR (1 << 1) +#define AUDIO_DAI_PLAY_INTR (1 << 0) + +#define AUDIO_DAI_FORMAT(fmt, pol, clk) (((fmt) << 16) | ((pol) << 8) | (clk)) +#define AUDIO_DAI_FORMAT_FORMAT(format) (((format) >> 16) & 0xff) +#define AUDIO_DAI_FORMAT_POLARITY(format) (((format) >> 8) & 0xff) +#define AUDIO_DAI_FORMAT_CLOCK(format) (((format) >> 0) & 0xff) + + +#endif /* __DAI_H__ */ diff --git a/sys/dev/sound/fdt/audio_dai_if.m b/sys/dev/sound/fdt/audio_dai_if.m new file mode 100644 index 000000000000..dc3ebbba5489 --- /dev/null +++ b/sys/dev/sound/fdt/audio_dai_if.m @@ -0,0 +1,95 @@ +#- +# Copyright (c) 2019 Oleksandr Tymoshenko +# +# 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$ +# + +CODE { + #include + #include + #include +} + +INTERFACE audio_dai; + +# set DAI format for communications between CPU/codec nodes +METHOD int init { + device_t dev; + uint32_t format; +} + +# Initialize DAI and set up interrrupt handler +METHOD int setup_intr { + device_t dev; + driver_intr_t intr_handler; + void *intr_arg; +} + +# Setup mixers for codec node +METHOD int setup_mixer { + device_t dev; + device_t ausocdev; +} + +# setup clock speed +METHOD int set_sysclk { + device_t dev; + uint32_t rate; + int dai_dir; +} + +METHOD int trigger { + device_t dev; + int go; + int pcm_dir; +} + +METHOD struct pcmchan_caps* get_caps { + device_t dev; +} + +METHOD uint32_t get_ptr { + device_t dev; + int pcm_dir; +} + +# Set PCM channel format +METHOD uint32_t set_chanformat { + device_t dev; + uint32_t format; +} + +# Set PCM channel sampling rate +METHOD uint32_t set_chanspeed { + device_t dev; + uint32_t speed; +} + +# call DAI interrupt handler +# returns 1 if call to chn_intr required, 0 otherwise +METHOD int intr { + device_t dev; + struct snd_dbuf *play_buf; + struct snd_dbuf *rec_buf; +} diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c new file mode 100644 index 000000000000..cd5807d955c9 --- /dev/null +++ b/sys/dev/sound/fdt/audio_soc.c @@ -0,0 +1,546 @@ +/*- + * Copyright (c) 2019 Oleksandr Tymoshenko + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include "audio_dai_if.h" + +#define AUDIO_BUFFER_SIZE 48000 * 4 + +struct audio_soc_aux_node { + SLIST_ENTRY(audio_soc_aux_node) link; + device_t dev; +}; + +struct audio_soc_channel { + struct audio_soc_softc *sc; /* parent device's softc */ + struct pcm_channel *pcm; /* PCM channel */ + struct snd_dbuf *buf; /* PCM buffer */ + int dir; /* direction */ +}; + +struct audio_soc_softc { + /* + * pcm_register assumes that sc is snddev_info, + * so this has to be first structure member for "compatiblity" + */ + struct snddev_info info; + device_t dev; + char *name; + struct intr_config_hook init_hook; + device_t cpu_dev; + device_t codec_dev; + SLIST_HEAD(, audio_soc_aux_node) aux_devs; + unsigned int mclk_fs; + struct audio_soc_channel play_channel; + struct audio_soc_channel rec_channel; + /* + * The format is from the CPU node, for CODEC node clock roles + * need to be reversed. + */ + uint32_t format; + uint32_t link_mclk_fs; +}; + +static struct ofw_compat_data compat_data[] = { + {"simple-audio-card", 1}, + {NULL, 0}, +}; + +static struct { + const char *name; + unsigned int fmt; +} ausoc_dai_formats[] = { + { "i2s", AUDIO_DAI_FORMAT_I2S }, + { "right_j", AUDIO_DAI_FORMAT_RJ }, + { "left_j", AUDIO_DAI_FORMAT_LJ }, + { "dsp_a", AUDIO_DAI_FORMAT_DSPA }, + { "dsp_b", AUDIO_DAI_FORMAT_DSPB }, + { "ac97", AUDIO_DAI_FORMAT_AC97 }, + { "pdm", AUDIO_DAI_FORMAT_PDM }, +}; + +static int audio_soc_probe(device_t dev); +static int audio_soc_attach(device_t dev); +static int audio_soc_detach(device_t dev); + +/* + * Invert master/slave roles for CODEC side of the node + */ +static uint32_t +audio_soc_reverse_clocks(uint32_t format) +{ + int fmt, pol, clk; + + fmt = AUDIO_DAI_FORMAT_FORMAT(format); + pol = AUDIO_DAI_FORMAT_POLARITY(format); + clk = AUDIO_DAI_FORMAT_CLOCK(format); + + switch (clk) { + case AUDIO_DAI_CLOCK_CBM_CFM: + clk = AUDIO_DAI_CLOCK_CBS_CFS; + break; + case AUDIO_DAI_CLOCK_CBS_CFM: + clk = AUDIO_DAI_CLOCK_CBM_CFS; + break; + case AUDIO_DAI_CLOCK_CBM_CFS: + clk = AUDIO_DAI_CLOCK_CBS_CFM; + break; + case AUDIO_DAI_CLOCK_CBS_CFS: + clk = AUDIO_DAI_CLOCK_CBM_CFM; + break; + } + + return AUDIO_DAI_FORMAT(fmt, pol, clk); +} + +static uint32_t +audio_soc_chan_setblocksize(kobj_t obj, void *data, uint32_t blocksz) +{ + + return (blocksz); +} + +static int +audio_soc_chan_setformat(kobj_t obj, void *data, uint32_t format) +{ + + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + + ausoc_chan = data; + sc = ausoc_chan->sc; + + return AUDIO_DAI_SET_CHANFORMAT(sc->cpu_dev, format); +} + +static uint32_t +audio_soc_chan_setspeed(kobj_t obj, void *data, uint32_t speed) +{ + + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + uint32_t rate; + struct audio_soc_aux_node *aux_node; + + ausoc_chan = data; + sc = ausoc_chan->sc; + + if (sc->link_mclk_fs) { + rate = speed * sc->link_mclk_fs; + if (AUDIO_DAI_SET_SYSCLK(sc->cpu_dev, rate, AUDIO_DAI_CLOCK_IN)) + device_printf(sc->dev, "failed to set sysclk for CPU node\n"); + + if (AUDIO_DAI_SET_SYSCLK(sc->codec_dev, rate, AUDIO_DAI_CLOCK_OUT)) + device_printf(sc->dev, "failed to set sysclk for codec node\n"); + + SLIST_FOREACH(aux_node, &sc->aux_devs, link) { + if (AUDIO_DAI_SET_SYSCLK(aux_node->dev, rate, AUDIO_DAI_CLOCK_OUT)) + device_printf(sc->dev, "failed to set sysclk for aux node\n"); + } + } + + /* + * Let CPU node determine speed + */ + speed = AUDIO_DAI_SET_CHANSPEED(sc->cpu_dev, speed); + AUDIO_DAI_SET_CHANSPEED(sc->codec_dev, speed); + SLIST_FOREACH(aux_node, &sc->aux_devs, link) { + AUDIO_DAI_SET_CHANSPEED(aux_node->dev, speed); + } + + return (speed); +} + +static uint32_t +audio_soc_chan_getptr(kobj_t obj, void *data) +{ + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + + ausoc_chan = data; + sc = ausoc_chan->sc; + + return AUDIO_DAI_GET_PTR(sc->cpu_dev, ausoc_chan->dir); +} + +static void * +audio_soc_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, + struct pcm_channel *c, int dir) +{ + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + void *buffer; + + ausoc_chan = devinfo; + sc = ausoc_chan->sc; + buffer = malloc(AUDIO_BUFFER_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); + + if (sndbuf_setup(b, buffer, AUDIO_BUFFER_SIZE) != 0) { + free(buffer, M_DEVBUF); + return NULL; + } + + ausoc_chan->dir = dir; + ausoc_chan->buf = b; + ausoc_chan->pcm = c; + + return (devinfo); +} + +static int +audio_soc_chan_trigger(kobj_t obj, void *data, int go) +{ + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + struct audio_soc_aux_node *aux_node; + + ausoc_chan = (struct audio_soc_channel *)data; + sc = ausoc_chan->sc; + AUDIO_DAI_TRIGGER(sc->codec_dev, go, ausoc_chan->dir); + SLIST_FOREACH(aux_node, &sc->aux_devs, link) { + AUDIO_DAI_TRIGGER(aux_node->dev, go, ausoc_chan->dir); + } + + return AUDIO_DAI_TRIGGER(sc->cpu_dev, go, ausoc_chan->dir); +} + +static int +audio_soc_chan_free(kobj_t obj, void *data) +{ + + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + void *buffer; + + ausoc_chan = (struct audio_soc_channel *)data; + sc = ausoc_chan->sc; + + buffer = sndbuf_getbuf(ausoc_chan->buf); + if (buffer) + free(buffer, M_DEVBUF); + + return (0); +} + +static struct pcmchan_caps * +audio_soc_chan_getcaps(kobj_t obj, void *data) +{ + struct audio_soc_softc *sc; + struct audio_soc_channel *ausoc_chan; + + ausoc_chan = data; + sc = ausoc_chan->sc; + + return AUDIO_DAI_GET_CAPS(sc->cpu_dev); +} + +static kobj_method_t audio_soc_chan_methods[] = { + KOBJMETHOD(channel_init, audio_soc_chan_init), + KOBJMETHOD(channel_free, audio_soc_chan_free), + KOBJMETHOD(channel_setformat, audio_soc_chan_setformat), + KOBJMETHOD(channel_setspeed, audio_soc_chan_setspeed), + KOBJMETHOD(channel_setblocksize,audio_soc_chan_setblocksize), + KOBJMETHOD(channel_trigger, audio_soc_chan_trigger), + KOBJMETHOD(channel_getptr, audio_soc_chan_getptr), + KOBJMETHOD(channel_getcaps, audio_soc_chan_getcaps), + KOBJMETHOD_END +}; +CHANNEL_DECLARE(audio_soc_chan); + +static void +audio_soc_intr(void *arg) +{ + struct audio_soc_softc *sc; + int channel_intr_required; + + sc = (struct audio_soc_softc *)arg; + channel_intr_required = AUDIO_DAI_INTR(sc->cpu_dev, sc->play_channel.buf, sc->rec_channel.buf); + if (channel_intr_required & AUDIO_DAI_PLAY_INTR) + chn_intr(sc->play_channel.pcm); + if (channel_intr_required & AUDIO_DAI_REC_INTR) + chn_intr(sc->rec_channel.pcm); +} + +static int +audio_soc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "simple-audio-card"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static void +audio_soc_init(void *arg) +{ + struct audio_soc_softc *sc; + phandle_t node, child; + device_t daidev, auxdev; + uint32_t xref; + uint32_t *aux_devs; + int ncells, i; + struct audio_soc_aux_node *aux_node; + + sc = (struct audio_soc_softc *)arg; + config_intrhook_disestablish(&sc->init_hook); + + node = ofw_bus_get_node(sc->dev); + /* TODO: handle multi-link nodes */ + child = ofw_bus_find_child(node, "simple-audio-card,cpu"); + if (child == 0) { + device_printf(sc->dev, "cpu node is missing\n"); + return; + } + if ((OF_getencprop(child, "sound-dai", &xref, sizeof(xref))) <= 0) { + device_printf(sc->dev, "missing sound-dai property in cpu node\n"); + return; + } + daidev = OF_device_from_xref(xref); + if (daidev == NULL) { + device_printf(sc->dev, "no driver attached to cpu node\n"); + return; + } + sc->cpu_dev = daidev; + + child = ofw_bus_find_child(node, "simple-audio-card,codec"); + if (child == 0) { + device_printf(sc->dev, "codec node is missing\n"); + return; + } + if ((OF_getencprop(child, "sound-dai", &xref, sizeof(xref))) <= 0) { + device_printf(sc->dev, "missing sound-dai property in codec node\n"); + return; + } + daidev = OF_device_from_xref(xref); + if (daidev == NULL) { + device_printf(sc->dev, "no driver attached to codec node\n"); + return; + } + sc->codec_dev = daidev; + + /* Add AUX devices */ + aux_devs = NULL; + ncells = OF_getencprop_alloc_multi(node, "simple-audio-card,aux-devs", sizeof(*aux_devs), + (void **)&aux_devs); + + for (i = 0; i < ncells; i++) { + auxdev = OF_device_from_xref(aux_devs[i]); + if (auxdev == NULL) + device_printf(sc->dev, "warning: no driver attached to aux node\n"); + aux_node = (struct audio_soc_aux_node *)malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); + if (aux_node == NULL) { + device_printf(sc->dev, "failed to allocate aux node struct\n"); + return; + } + aux_node->dev = auxdev; + SLIST_INSERT_HEAD(&sc->aux_devs, aux_node, link); + } + + if (aux_devs) + OF_prop_free(aux_devs); + + if (AUDIO_DAI_INIT(sc->cpu_dev, sc->format)) { + device_printf(sc->dev, "failed to initialize cpu node\n"); + return; + } + + /* Reverse clock roles for CODEC */ + if (AUDIO_DAI_INIT(sc->codec_dev, audio_soc_reverse_clocks(sc->format))) { + device_printf(sc->dev, "failed to initialize codec node\n"); + return; + } + + SLIST_FOREACH(aux_node, &sc->aux_devs, link) { + if (AUDIO_DAI_INIT(aux_node->dev, audio_soc_reverse_clocks(sc->format))) { + device_printf(sc->dev, "failed to initialize aux node\n"); + return; + } + } + + if (pcm_register(sc->dev, sc, 1, 1)) { + device_printf(sc->dev, "failed to register PCM\n"); + return; + } + + pcm_getbuffersize(sc->dev, AUDIO_BUFFER_SIZE, AUDIO_BUFFER_SIZE, + AUDIO_BUFFER_SIZE); + sc->play_channel.sc = sc; + sc->rec_channel.sc = sc; + + pcm_addchan(sc->dev, PCMDIR_PLAY, &audio_soc_chan_class, &sc->play_channel); + pcm_addchan(sc->dev, PCMDIR_REC, &audio_soc_chan_class, &sc->rec_channel); + + pcm_setstatus(sc->dev, "at EXPERIMENT"); + + AUDIO_DAI_SETUP_INTR(sc->cpu_dev, audio_soc_intr, sc); + AUDIO_DAI_SETUP_MIXER(sc->codec_dev, sc->dev); + SLIST_FOREACH(aux_node, &sc->aux_devs, link) { + AUDIO_DAI_SETUP_MIXER(aux_node->dev, sc->dev); + } +} + +static int +audio_soc_attach(device_t dev) +{ + struct audio_soc_softc *sc; + char *name; + phandle_t node, cpu_child; + uint32_t xref; + int i, ret; + char tmp[32]; + unsigned int fmt, pol, clk; + bool frame_master, bitclock_master; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + ret = OF_getprop_alloc(node, "name", (void **)&name); + if (ret == -1) + name = "SoC audio"; + + sc->name = strdup(name, M_DEVBUF); + device_set_desc(dev, sc->name); + + if (ret != -1) + OF_prop_free(name); + + SLIST_INIT(&sc->aux_devs); + + ret = OF_getprop(node, "simple-audio-card,format", tmp, sizeof(tmp)); + if (ret == 0) { + for (i = 0; i < nitems(ausoc_dai_formats); i++) { + if (strcmp(tmp, ausoc_dai_formats[i].name) == 0) { + fmt = ausoc_dai_formats[i].fmt; + break; + } + } + if (i == nitems(ausoc_dai_formats)) + return (EINVAL); + } else + fmt = AUDIO_DAI_FORMAT_I2S; + + if (OF_getencprop(node, "simple-audio-card,mclk-fs", + &sc->link_mclk_fs, sizeof(sc->link_mclk_fs)) <= 0) + sc->link_mclk_fs = 0; + + /* Unless specified otherwise, CPU node is the master */ + frame_master = bitclock_master = true; + + cpu_child = ofw_bus_find_child(node, "simple-audio-card,cpu"); + + if ((OF_getencprop(node, "simple-audio-card,frame-master", &xref, sizeof(xref))) > 0) + frame_master = cpu_child == OF_node_from_xref(xref); + + if ((OF_getencprop(node, "simple-audio-card,bitclock-master", &xref, sizeof(xref))) > 0) + bitclock_master = cpu_child == OF_node_from_xref(xref); + + if (frame_master) { + clk = bitclock_master ? + AUDIO_DAI_CLOCK_CBM_CFM : AUDIO_DAI_CLOCK_CBS_CFM; + } else { + clk = bitclock_master ? + AUDIO_DAI_CLOCK_CBM_CFS : AUDIO_DAI_CLOCK_CBS_CFS; + } + + bool bitclock_inversion = OF_hasprop(node, "simple-audio-card,bitclock-inversion"); + bool frame_inversion = OF_hasprop(node, "simple-audio-card,frame-inversion"); + if (bitclock_inversion) { + pol = frame_inversion ? + AUDIO_DAI_POLARITY_IB_IF : AUDIO_DAI_POLARITY_IB_NF; + } else { + pol = frame_inversion ? + AUDIO_DAI_POLARITY_NB_IF : AUDIO_DAI_POLARITY_NB_NF; + } + + sc->format = AUDIO_DAI_FORMAT(fmt, pol, clk); + + sc->init_hook.ich_func = audio_soc_init; + sc->init_hook.ich_arg = sc; + if (config_intrhook_establish(&sc->init_hook) != 0) + return (ENOMEM); + + return (0); +} + +static int +audio_soc_detach(device_t dev) +{ + struct audio_soc_softc *sc; + struct audio_soc_aux_node *aux; + + sc = device_get_softc(dev); + if (sc->name) + free(sc->name, M_DEVBUF); + + while ((aux = SLIST_FIRST(&sc->aux_devs)) != NULL) { + SLIST_REMOVE_HEAD(&sc->aux_devs, link); + free(aux, M_DEVBUF); + } + + return (0); +} + +static device_method_t audio_soc_methods[] = { + /* device_if methods */ + DEVMETHOD(device_probe, audio_soc_probe), + DEVMETHOD(device_attach, audio_soc_attach), + DEVMETHOD(device_detach, audio_soc_detach), + + DEVMETHOD_END, +}; + +static driver_t audio_soc_driver = { + "pcm", + audio_soc_methods, + sizeof(struct audio_soc_softc), +}; + +DRIVER_MODULE(audio_soc, simplebus, audio_soc_driver, pcm_devclass, NULL, NULL); +MODULE_VERSION(audio_soc, 1); diff --git a/sys/dev/sound/fdt/dummy_codec.c b/sys/dev/sound/fdt/dummy_codec.c new file mode 100644 index 000000000000..6be2491a069d --- /dev/null +++ b/sys/dev/sound/fdt/dummy_codec.c @@ -0,0 +1,127 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "opt_snd.h" +#include +#include +#include "audio_dai_if.h" + +static struct ofw_compat_data compat_data[] = { + { "dummy-codec", 1}, + { NULL, 0 } +}; + +struct dummy_codec_softc { + device_t dev; +}; + +static int dummy_codec_probe(device_t dev); +static int dummy_codec_attach(device_t dev); +static int dummy_codec_detach(device_t dev); + +static int +dummy_codec_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Dummy Codec"); + return (BUS_PROBE_DEFAULT); +} + +static int +dummy_codec_attach(device_t dev) +{ + struct dummy_codec_softc *sc; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); + + return (0); +} + +static int +dummy_codec_detach(device_t dev) +{ + + return (0); +} + +static int +dummy_codec_dai_init(device_t dev, uint32_t format) +{ + + return (0); +} + +static device_method_t dummy_codec_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dummy_codec_probe), + DEVMETHOD(device_attach, dummy_codec_attach), + DEVMETHOD(device_detach, dummy_codec_detach), + + DEVMETHOD(audio_dai_init, dummy_codec_dai_init), + + DEVMETHOD_END +}; + +static driver_t dummy_codec_driver = { + "dummycodec", + dummy_codec_methods, + sizeof(struct dummy_codec_softc), +}; + +static devclass_t dummy_codec_devclass; + +DRIVER_MODULE(dummy_codec, simplebus, dummy_codec_driver, dummy_codec_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); diff --git a/sys/dev/sound/fdt/simple_amplifier.c b/sys/dev/sound/fdt/simple_amplifier.c new file mode 100644 index 000000000000..a0531914d9be --- /dev/null +++ b/sys/dev/sound/fdt/simple_amplifier.c @@ -0,0 +1,206 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "opt_snd.h" +#include +#include +#include "audio_dai_if.h" + +static struct ofw_compat_data compat_data[] = { + { "simple-audio-amplifier", 1}, + { NULL, 0} +}; + +struct simple_amp_softc { + device_t dev; + regulator_t supply_vcc; + gpio_pin_t gpio_enable; + bool gpio_is_valid; +}; + +static int simple_amp_probe(device_t dev); +static int simple_amp_attach(device_t dev); +static int simple_amp_detach(device_t dev); + +static int +simple_amp_probe(device_t dev) +{ *** 133 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:06:56 2021 Return-Path: Delivered-To: dev-commits-src-main@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 A53C1662F31; Fri, 11 Jun 2021 19:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1r1X3MSTz4Ymr; Fri, 11 Jun 2021 19:06:56 +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 5C36C2847A; Fri, 11 Jun 2021 19:06:56 +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 15BJ6uK3010322; Fri, 11 Jun 2021 19:06:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJ6uOG010321; Fri, 11 Jun 2021 19:06:56 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:06:56 GMT Message-Id: <202106111906.15BJ6uOG010321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: cb25a9455802 - main - arm64: allwinner: Add i2s and codec support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb25a9455802de29a3609f34bef9e94af842b890 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:06:56 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cb25a9455802de29a3609f34bef9e94af842b890 commit cb25a9455802de29a3609f34bef9e94af842b890 Author: Oleksandr Tymoshenko AuthorDate: 2021-05-13 19:10:38 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-11 19:06:08 +0000 arm64: allwinner: Add i2s and codec support Differential Revision: https://reviews.freebsd.org/D27830 --- sys/arm/allwinner/a33_codec.c | 417 +++++++++++++++ sys/arm/allwinner/a64/sun50i_a64_acodec.c | 488 ++++++++++++++++++ sys/arm/allwinner/aw_i2s.c | 813 ++++++++++++++++++++++++++++++ sys/arm64/conf/GENERIC | 7 +- sys/conf/files.arm64 | 3 + 5 files changed, 1726 insertions(+), 2 deletions(-) diff --git a/sys/arm/allwinner/a33_codec.c b/sys/arm/allwinner/a33_codec.c new file mode 100644 index 000000000000..2b3d5f6ef01c --- /dev/null +++ b/sys/arm/allwinner/a33_codec.c @@ -0,0 +1,417 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * Copyright (c) 2018 Jared McNeill + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include "opt_snd.h" +#include +#include +#include "audio_dai_if.h" + +#define SYSCLK_CTL 0x00c +#define AIF1CLK_ENA (1 << 11) +#define AIF1CLK_SRC_MASK (3 << 8) +#define AIF1CLK_SRC_PLL (2 << 8) +#define SYSCLK_ENA (1 << 3) +#define SYSCLK_SRC (1 << 0) + +#define MOD_CLK_ENA 0x010 +#define MOD_RST_CTL 0x014 +#define MOD_AIF1 (1 << 15) +#define MOD_ADC (1 << 3) +#define MOD_DAC (1 << 2) + +#define SYS_SR_CTRL 0x018 +#define AIF1_FS_MASK (0xf << 12) +#define AIF_FS_48KHZ (8 << 12) + +#define AIF1CLK_CTRL 0x040 +#define AIF1_MSTR_MOD (1 << 15) +#define AIF1_BCLK_INV (1 << 14) +#define AIF1_LRCK_INV (1 << 13) +#define AIF1_BCLK_DIV_MASK (0xf << 9) +#define AIF1_BCLK_DIV_16 (6 << 9) +#define AIF1_LRCK_DIV_MASK (7 << 6) +#define AIF1_LRCK_DIV_16 (0 << 6) +#define AIF1_LRCK_DIV_64 (2 << 6) +#define AIF1_WORD_SIZ_MASK (3 << 4) +#define AIF1_WORD_SIZ_16 (1 << 4) +#define AIF1_DATA_FMT_MASK (3 << 2) +#define AIF1_DATA_FMT_I2S (0 << 2) +#define AIF1_DATA_FMT_LJ (1 << 2) +#define AIF1_DATA_FMT_RJ (2 << 2) +#define AIF1_DATA_FMT_DSP (3 << 2) + +#define AIF1_ADCDAT_CTRL 0x044 +#define AIF1_ADC0L_ENA (1 << 15) +#define AIF1_ADC0R_ENA (1 << 14) + +#define AIF1_DACDAT_CTRL 0x048 +#define AIF1_DAC0L_ENA (1 << 15) +#define AIF1_DAC0R_ENA (1 << 14) + +#define AIF1_MXR_SRC 0x04c +#define AIF1L_MXR_SRC_MASK (0xf << 12) +#define AIF1L_MXR_SRC_AIF1 (0x8 << 12) +#define AIF1L_MXR_SRC_ADC (0x2 << 12) +#define AIF1R_MXR_SRC_MASK (0xf << 8) +#define AIF1R_MXR_SRC_AIF1 (0x8 << 8) +#define AIF1R_MXR_SRC_ADC (0x2 << 8) + +#define ADC_DIG_CTRL 0x100 +#define ADC_DIG_CTRL_ENAD (1 << 15) + +#define HMIC_CTRL1 0x110 +#define HMIC_CTRL1_N_MASK (0xf << 8) +#define HMIC_CTRL1_N(n) (((n) & 0xf) << 8) +#define HMIC_CTRL1_JACK_IN_IRQ_EN (1 << 4) +#define HMIC_CTRL1_JACK_OUT_IRQ_EN (1 << 3) +#define HMIC_CTRL1_MIC_DET_IRQ_EN (1 << 0) + +#define HMIC_CTRL2 0x114 +#define HMIC_CTRL2_MDATA_THRES __BITS(12,8) + +#define HMIC_STS 0x118 +#define HMIC_STS_MIC_PRESENT (1 << 6) +#define HMIC_STS_JACK_DET_OIRQ (1 << 4) +#define HMIC_STS_JACK_DET_IIRQ (1 << 3) +#define HMIC_STS_MIC_DET_ST (1 << 0) + +#define DAC_DIG_CTRL 0x120 +#define DAC_DIG_CTRL_ENDA (1 << 15) + +#define DAC_MXR_SRC 0x130 +#define DACL_MXR_SRC_MASK (0xf << 12) +#define DACL_MXR_SRC_AIF1_DAC0L (0x8 << 12) +#define DACR_MXR_SRC_MASK (0xf << 8) +#define DACR_MXR_SRC_AIF1_DAC0R (0x8 << 8) + +static struct ofw_compat_data compat_data[] = { + { "allwinner,sun8i-a33-codec", 1}, + { NULL, 0 } +}; + +static struct resource_spec sun8i_codec_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +struct sun8i_codec_softc { + device_t dev; + struct resource *res[2]; + struct mtx mtx; + clk_t clk_gate; + clk_t clk_mod; + void * intrhand; +}; + +#define CODEC_LOCK(sc) mtx_lock(&(sc)->mtx) +#define CODEC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define CODEC_READ(sc, reg) bus_read_4((sc)->res[0], (reg)) +#define CODEC_WRITE(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) + +static int sun8i_codec_probe(device_t dev); +static int sun8i_codec_attach(device_t dev); +static int sun8i_codec_detach(device_t dev); + +static int +sun8i_codec_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Allwinner Codec"); + return (BUS_PROBE_DEFAULT); +} + +static int +sun8i_codec_attach(device_t dev) +{ + struct sun8i_codec_softc *sc; + int error; + uint32_t val; + struct gpiobus_pin *pa_pin; + phandle_t node; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + if (bus_alloc_resources(dev, sun8i_codec_spec, sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + error = clk_get_by_ofw_name(dev, 0, "mod", &sc->clk_mod); + if (error != 0) { + device_printf(dev, "cannot get \"mod\" clock\n"); + goto fail; + } + + error = clk_get_by_ofw_name(dev, 0, "bus", &sc->clk_gate); + if (error != 0) { + device_printf(dev, "cannot get \"bus\" clock\n"); + goto fail; + } + + error = clk_enable(sc->clk_gate); + if (error != 0) { + device_printf(dev, "cannot enable \"bus\" clock\n"); + goto fail; + } + + /* Enable clocks */ + val = CODEC_READ(sc, SYSCLK_CTL); + val |= AIF1CLK_ENA; + val &= ~AIF1CLK_SRC_MASK; + val |= AIF1CLK_SRC_PLL; + val |= SYSCLK_ENA; + val &= ~SYSCLK_SRC; + CODEC_WRITE(sc, SYSCLK_CTL, val); + CODEC_WRITE(sc, MOD_CLK_ENA, MOD_AIF1 | MOD_ADC | MOD_DAC); + CODEC_WRITE(sc, MOD_RST_CTL, MOD_AIF1 | MOD_ADC | MOD_DAC); + + /* Enable digital parts */ + CODEC_WRITE(sc, DAC_DIG_CTRL, DAC_DIG_CTRL_ENDA); + CODEC_WRITE(sc, ADC_DIG_CTRL, ADC_DIG_CTRL_ENAD); + + /* Set AIF1 to 48 kHz */ + val = CODEC_READ(sc, SYS_SR_CTRL); + val &= ~AIF1_FS_MASK; + val |= AIF_FS_48KHZ; + CODEC_WRITE(sc, SYS_SR_CTRL, val); + + /* Set AIF1 to 16-bit */ + val = CODEC_READ(sc, AIF1CLK_CTRL); + val &= ~AIF1_WORD_SIZ_MASK; + val |= AIF1_WORD_SIZ_16; + CODEC_WRITE(sc, AIF1CLK_CTRL, val); + + /* Enable AIF1 DAC timelot 0 */ + val = CODEC_READ(sc, AIF1_DACDAT_CTRL); + val |= AIF1_DAC0L_ENA; + val |= AIF1_DAC0R_ENA; + CODEC_WRITE(sc, AIF1_DACDAT_CTRL, val); + + /* Enable AIF1 ADC timelot 0 */ + val = CODEC_READ(sc, AIF1_ADCDAT_CTRL); + val |= AIF1_ADC0L_ENA; + val |= AIF1_ADC0R_ENA; + CODEC_WRITE(sc, AIF1_ADCDAT_CTRL, val); + + /* DAC mixer source select */ + val = CODEC_READ(sc, DAC_MXR_SRC); + val &= ~DACL_MXR_SRC_MASK; + val |= DACL_MXR_SRC_AIF1_DAC0L; + val &= ~DACR_MXR_SRC_MASK; + val |= DACR_MXR_SRC_AIF1_DAC0R; + CODEC_WRITE(sc, DAC_MXR_SRC, val); + + /* ADC mixer source select */ + val = CODEC_READ(sc, AIF1_MXR_SRC); + val &= ~AIF1L_MXR_SRC_MASK; + val |= AIF1L_MXR_SRC_ADC; + val &= ~AIF1R_MXR_SRC_MASK; + val |= AIF1R_MXR_SRC_ADC; + CODEC_WRITE(sc, AIF1_MXR_SRC, val); + + /* Enable PA power */ + /* Unmute PA */ + if (gpio_pin_get_by_ofw_property(dev, node, "allwinner,pa-gpios", + &pa_pin) == 0) { + error = gpio_pin_set_active(pa_pin, 1); + if (error != 0) + device_printf(dev, "failed to unmute PA\n"); + } + + OF_device_register_xref(OF_xref_from_node(node), dev); + + return (0); + +fail: + sun8i_codec_detach(dev); + return (error); +} + +static int +sun8i_codec_detach(device_t dev) +{ + struct sun8i_codec_softc *sc; + + sc = device_get_softc(dev); + + if (sc->clk_gate) + clk_release(sc->clk_gate); + + if (sc->clk_mod) + clk_release(sc->clk_mod); + + if (sc->intrhand != NULL) + bus_teardown_intr(sc->dev, sc->res[1], sc->intrhand); + + bus_release_resources(dev, sun8i_codec_spec, sc->res); + mtx_destroy(&sc->mtx); + + return (0); +} + +static int +sun8i_codec_dai_init(device_t dev, uint32_t format) +{ + struct sun8i_codec_softc *sc; + int fmt, pol, clk; + uint32_t val; + + sc = device_get_softc(dev); + + fmt = AUDIO_DAI_FORMAT_FORMAT(format); + pol = AUDIO_DAI_FORMAT_POLARITY(format); + clk = AUDIO_DAI_FORMAT_CLOCK(format); + + val = CODEC_READ(sc, AIF1CLK_CTRL); + + val &= ~AIF1_DATA_FMT_MASK; + switch (fmt) { + case AUDIO_DAI_FORMAT_I2S: + val |= AIF1_DATA_FMT_I2S; + break; + case AUDIO_DAI_FORMAT_RJ: + val |= AIF1_DATA_FMT_RJ; + break; + case AUDIO_DAI_FORMAT_LJ: + val |= AIF1_DATA_FMT_LJ; + break; + case AUDIO_DAI_FORMAT_DSPA: + case AUDIO_DAI_FORMAT_DSPB: + val |= AIF1_DATA_FMT_DSP; + break; + default: + return EINVAL; + } + + val &= ~(AIF1_BCLK_INV|AIF1_LRCK_INV); + /* Codec LRCK polarity is inverted (datasheet is wrong) */ + if (!AUDIO_DAI_POLARITY_INVERTED_FRAME(pol)) + val |= AIF1_LRCK_INV; + if (AUDIO_DAI_POLARITY_INVERTED_BCLK(pol)) + val |= AIF1_BCLK_INV; + + switch (clk) { + case AUDIO_DAI_CLOCK_CBM_CFM: + val &= ~AIF1_MSTR_MOD; /* codec is master */ + break; + case AUDIO_DAI_CLOCK_CBS_CFS: + val |= AIF1_MSTR_MOD; /* codec is slave */ + break; + default: + return EINVAL; + } + + val &= ~AIF1_LRCK_DIV_MASK; + val |= AIF1_LRCK_DIV_64; + + val &= ~AIF1_BCLK_DIV_MASK; + val |= AIF1_BCLK_DIV_16; + + CODEC_WRITE(sc, AIF1CLK_CTRL, val); + + return (0); +} + +static int +sun8i_codec_dai_trigger(device_t dev, int go, int pcm_dir) +{ + + return (0); +} + +static int +sun8i_codec_dai_setup_mixer(device_t dev, device_t pcmdev) +{ + struct sun8i_codec_softc *sc; + + sc = device_get_softc(dev); + /* Do nothing for now */ + + return (0); +} + + +static device_method_t sun8i_codec_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, sun8i_codec_probe), + DEVMETHOD(device_attach, sun8i_codec_attach), + DEVMETHOD(device_detach, sun8i_codec_detach), + + DEVMETHOD(audio_dai_init, sun8i_codec_dai_init), + DEVMETHOD(audio_dai_setup_mixer, sun8i_codec_dai_setup_mixer), + DEVMETHOD(audio_dai_trigger, sun8i_codec_dai_trigger), + + DEVMETHOD_END +}; + +static driver_t sun8i_codec_driver = { + "sun8icodec", + sun8i_codec_methods, + sizeof(struct sun8i_codec_softc), +}; + +static devclass_t sun8i_codec_devclass; + +DRIVER_MODULE(sun8i_codec, simplebus, sun8i_codec_driver, sun8i_codec_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); diff --git a/sys/arm/allwinner/a64/sun50i_a64_acodec.c b/sys/arm/allwinner/a64/sun50i_a64_acodec.c new file mode 100644 index 000000000000..10febf98abd8 --- /dev/null +++ b/sys/arm/allwinner/a64/sun50i_a64_acodec.c @@ -0,0 +1,488 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * Copyright (c) 2018 Jared McNeill + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "syscon_if.h" + +#include "opt_snd.h" +#include +#include +#include "audio_dai_if.h" +#include "mixer_if.h" + +#define A64_PR_CFG 0x00 +#define A64_AC_PR_RST (1 << 28) +#define A64_AC_PR_RW (1 << 24) +#define A64_AC_PR_ADDR_MASK (0x1f << 16) +#define A64_AC_PR_ADDR(n) (((n) & 0x1f) << 16) +#define A64_ACDA_PR_WDAT_MASK (0xff << 8) +#define A64_ACDA_PR_WDAT(n) (((n) & 0xff) << 8) +#define A64_ACDA_PR_RDAT(n) ((n) & 0xff) + +#define A64_HP_CTRL 0x00 +#define A64_HPPA_EN (1 << 6) +#define A64_HPVOL_MASK 0x3f +#define A64_HPVOL(n) ((n) & 0x3f) +#define A64_OL_MIX_CTRL 0x01 +#define A64_LMIXMUTE_LDAC (1 << 1) +#define A64_OR_MIX_CTRL 0x02 +#define A64_RMIXMUTE_RDAC (1 << 1) +#define A64_LINEOUT_CTRL0 0x05 +#define A64_LINEOUT_LEFT_EN (1 << 7) +#define A64_LINEOUT_RIGHT_EN (1 << 6) +#define A64_LINEOUT_EN (A64_LINEOUT_LEFT_EN|A64_LINEOUT_RIGHT_EN) +#define A64_LINEOUT_CTRL1 0x06 +#define A64_LINEOUT_VOL __BITS(4,0) +#define A64_MIC1_CTRL 0x07 +#define A64_MIC1G __BITS(6,4) +#define A64_MIC1AMPEN (1 << 3) +#define A64_MIC1BOOST __BITS(2,0) +#define A64_MIC2_CTRL 0x08 +#define A64_MIC2_SEL (1 << 7) +#define A64_MIC2G_MASK (7 << 4) +#define A64_MIC2G(n) (((n) & 7) << 4) +#define A64_MIC2AMPEN (1 << 3) +#define A64_MIC2BOOST_MASK (7 << 0) +#define A64_MIC2BOOST(n) (((n) & 7) << 0) +#define A64_LINEIN_CTRL 0x09 +#define A64_LINEING __BITS(6,4) +#define A64_MIX_DAC_CTRL 0x0a +#define A64_DACAREN (1 << 7) +#define A64_DACALEN (1 << 6) +#define A64_RMIXEN (1 << 5) +#define A64_LMIXEN (1 << 4) +#define A64_RHPPAMUTE (1 << 3) +#define A64_LHPPAMUTE (1 << 2) +#define A64_RHPIS (1 << 1) +#define A64_LHPIS (1 << 0) +#define A64_L_ADCMIX_SRC 0x0b +#define A64_R_ADCMIX_SRC 0x0c +#define A64_ADCMIX_SRC_MIC1 (1 << 6) +#define A64_ADCMIX_SRC_MIC2 (1 << 5) +#define A64_ADCMIX_SRC_LINEIN (1 << 2) +#define A64_ADCMIX_SRC_OMIXER (1 << 1) +#define A64_ADC_CTRL 0x0d +#define A64_ADCREN (1 << 7) +#define A64_ADCLEN (1 << 6) +#define A64_ADCG __BITS(2,0) +#define A64_JACK_MIC_CTRL 0x1d +#define A64_JACKDETEN (1 << 7) +#define A64_INNERRESEN (1 << 6) +#define A64_HMICBIASEN (1 << 5) +#define A64_AUTOPLEN (1 << 1) + +#define A64CODEC_MIXER_DEVS ((1 << SOUND_MIXER_VOLUME) | \ + (1 << SOUND_MIXER_MIC)) + +static struct ofw_compat_data compat_data[] = { + { "allwinner,sun50i-a64-codec-analog", 1}, + { NULL, 0 } +}; + +struct a64codec_softc { + device_t dev; + struct resource *res; + struct mtx mtx; + u_int regaddr; /* address for the sysctl */ +}; + +#define A64CODEC_LOCK(sc) mtx_lock(&(sc)->mtx) +#define A64CODEC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define A64CODEC_READ(sc, reg) bus_read_4((sc)->res, (reg)) +#define A64CODEC_WRITE(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int a64codec_probe(device_t dev); +static int a64codec_attach(device_t dev); +static int a64codec_detach(device_t dev); + +static u_int +a64_acodec_pr_read(struct a64codec_softc *sc, u_int addr) +{ + uint32_t val; + + /* Read current value */ + val = A64CODEC_READ(sc, A64_PR_CFG); + + /* De-assert reset */ + val |= A64_AC_PR_RST; + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Read mode */ + val &= ~A64_AC_PR_RW; + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Set address */ + val &= ~A64_AC_PR_ADDR_MASK; + val |= A64_AC_PR_ADDR(addr); + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Read data */ + val = A64CODEC_READ(sc, A64_PR_CFG); + return A64_ACDA_PR_RDAT(val); +} + +static void +a64_acodec_pr_write(struct a64codec_softc *sc, u_int addr, u_int data) +{ + uint32_t val; + + /* Read current value */ + val = A64CODEC_READ(sc, A64_PR_CFG); + + /* De-assert reset */ + val |= A64_AC_PR_RST; + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Set address */ + val &= ~A64_AC_PR_ADDR_MASK; + val |= A64_AC_PR_ADDR(addr); + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Write data */ + val &= ~A64_ACDA_PR_WDAT_MASK; + val |= A64_ACDA_PR_WDAT(data); + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Write mode */ + val |= A64_AC_PR_RW; + A64CODEC_WRITE(sc, A64_PR_CFG, val); + + /* Clear write mode */ + val &= ~A64_AC_PR_RW; + A64CODEC_WRITE(sc, A64_PR_CFG, val); +} + +static void +a64_acodec_pr_set_clear(struct a64codec_softc *sc, u_int addr, u_int set, u_int clr) +{ + u_int old, new; + + old = a64_acodec_pr_read(sc, addr); + new = set | (old & ~clr); + a64_acodec_pr_write(sc, addr, new); +} + +static int +a64codec_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Allwinner A64 Analog Codec"); + return (BUS_PROBE_DEFAULT); +} + +static int +a64codec_attach(device_t dev) +{ + struct a64codec_softc *sc; + int error, rid; + phandle_t node; + regulator_t reg; + + sc = device_get_softc(dev); + sc->dev = dev; + + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (!sc->res) { + device_printf(dev, "cannot allocate resource for device\n"); + error = ENXIO; + goto fail; + } + + if (regulator_get_by_ofw_property(dev, 0, "cpvdd-supply", ®) == 0) { + error = regulator_enable(reg); + if (error != 0) { + device_printf(dev, "cannot enable PHY regulator\n"); + goto fail; + } + } + + /* Right & Left Headphone PA enable */ + a64_acodec_pr_set_clear(sc, A64_HP_CTRL, + A64_HPPA_EN, 0); + + /* Microphone BIAS enable */ + a64_acodec_pr_set_clear(sc, A64_JACK_MIC_CTRL, + A64_HMICBIASEN | A64_INNERRESEN, 0); + + /* Unmute DAC to output mixer */ + a64_acodec_pr_set_clear(sc, A64_OL_MIX_CTRL, + A64_LMIXMUTE_LDAC, 0); + a64_acodec_pr_set_clear(sc, A64_OR_MIX_CTRL, + A64_RMIXMUTE_RDAC, 0); + + /* For now we work only with headphones */ + a64_acodec_pr_set_clear(sc, A64_LINEOUT_CTRL0, + 0, A64_LINEOUT_EN); + a64_acodec_pr_set_clear(sc, A64_HP_CTRL, + A64_HPPA_EN, 0); + + u_int val = a64_acodec_pr_read(sc, A64_HP_CTRL); + val &= ~(0x3f); + val |= 0x25; + a64_acodec_pr_write(sc, A64_HP_CTRL, val); + + a64_acodec_pr_set_clear(sc, A64_MIC2_CTRL, + A64_MIC2AMPEN | A64_MIC2_SEL | A64_MIC2G(0x3) | A64_MIC2BOOST(0x4), + A64_MIC2G_MASK | A64_MIC2BOOST_MASK); + + a64_acodec_pr_write(sc, A64_L_ADCMIX_SRC, + A64_ADCMIX_SRC_MIC2); + a64_acodec_pr_write(sc, A64_R_ADCMIX_SRC, + A64_ADCMIX_SRC_MIC2); + + /* Max out MIC2 gain */ + val = a64_acodec_pr_read(sc, A64_MIC2_CTRL); + val &= ~(0x7); + val |= (0x7); + val &= ~(7 << 4); + val |= (7 << 4); + a64_acodec_pr_write(sc, A64_MIC2_CTRL, val); + + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); + + return (0); + +fail: + a64codec_detach(dev); + return (error); +} + +static int +a64codec_detach(device_t dev) +{ + struct a64codec_softc *sc; + + sc = device_get_softc(dev); + + if (sc->res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->res); + mtx_destroy(&sc->mtx); + + return (0); +} + +static int +a64codec_mixer_init(struct snd_mixer *m) +{ + + mix_setdevs(m, A64CODEC_MIXER_DEVS); + + return (0); +} + +static int +a64codec_mixer_uninit(struct snd_mixer *m) +{ + + return (0); +} + +static int +a64codec_mixer_reinit(struct snd_mixer *m) +{ + + return (0); +} + +static int +a64codec_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) +{ + struct a64codec_softc *sc; + struct mtx *mixer_lock; + uint8_t do_unlock; + u_int val; + + sc = device_get_softc(mix_getdevinfo(m)); + mixer_lock = mixer_get_lock(m); + + if (mtx_owned(mixer_lock)) { + do_unlock = 0; + } else { + do_unlock = 1; + mtx_lock(mixer_lock); + } + + right = left; + + A64CODEC_LOCK(sc); + switch(dev) { + case SOUND_MIXER_VOLUME: + val = a64_acodec_pr_read(sc, A64_HP_CTRL); + val &= ~(A64_HPVOL_MASK); + val |= A64_HPVOL(left * 63 / 100); + a64_acodec_pr_write(sc, A64_HP_CTRL, val); + break; + + case SOUND_MIXER_MIC: + val = a64_acodec_pr_read(sc, A64_MIC2_CTRL); + val &= ~(A64_MIC2BOOST_MASK); + val |= A64_MIC2BOOST(left * 7 / 100); + a64_acodec_pr_write(sc, A64_MIC2_CTRL, val); + break; + default: + break; + } + A64CODEC_UNLOCK(sc); + + if (do_unlock) { + mtx_unlock(mixer_lock); + } + + return (left | (right << 8)); +} + +static unsigned +a64codec_mixer_setrecsrc(struct snd_mixer *m, unsigned src) +{ + + return (0); +} + +static kobj_method_t a64codec_mixer_methods[] = { + KOBJMETHOD(mixer_init, a64codec_mixer_init), + KOBJMETHOD(mixer_uninit, a64codec_mixer_uninit), + KOBJMETHOD(mixer_reinit, a64codec_mixer_reinit), + KOBJMETHOD(mixer_set, a64codec_mixer_set), + KOBJMETHOD(mixer_setrecsrc, a64codec_mixer_setrecsrc), + KOBJMETHOD_END +}; + +MIXER_DECLARE(a64codec_mixer); + +static int +a64codec_dai_init(device_t dev, uint32_t format) +{ + + return (0); +} + +static int +a64codec_dai_trigger(device_t dev, int go, int pcm_dir) +{ + struct a64codec_softc *sc = device_get_softc(dev); + + if ((pcm_dir != PCMDIR_PLAY) && (pcm_dir != PCMDIR_REC)) + return (EINVAL); + + switch (go) { + case PCMTRIG_START: + if (pcm_dir == PCMDIR_PLAY) { + /* Enable DAC analog l/r channels, HP PA, and output mixer */ + a64_acodec_pr_set_clear(sc, A64_MIX_DAC_CTRL, + A64_DACAREN | A64_DACALEN | A64_RMIXEN | A64_LMIXEN | + A64_RHPPAMUTE | A64_LHPPAMUTE, 0); + } + else if (pcm_dir == PCMDIR_REC) { + /* Enable ADC analog l/r channels */ + a64_acodec_pr_set_clear(sc, A64_ADC_CTRL, + A64_ADCREN | A64_ADCLEN, 0); + } + break; + + case PCMTRIG_STOP: + case PCMTRIG_ABORT: + if (pcm_dir == PCMDIR_PLAY) { + /* Disable DAC analog l/r channels, HP PA, and output mixer */ + a64_acodec_pr_set_clear(sc, A64_MIX_DAC_CTRL, + 0, A64_DACAREN | A64_DACALEN | A64_RMIXEN | A64_LMIXEN | + A64_RHPPAMUTE | A64_LHPPAMUTE); + } + else if (pcm_dir == PCMDIR_REC) { + /* Disable ADC analog l/r channels */ + a64_acodec_pr_set_clear(sc, A64_ADC_CTRL, + 0, A64_ADCREN | A64_ADCLEN); + } + break; + } + + return (0); +} + +static int +a64codec_dai_setup_mixer(device_t dev, device_t pcmdev) +{ + + mixer_init(pcmdev, &a64codec_mixer_class, dev); + + return (0); +} + +static device_method_t a64codec_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, a64codec_probe), + DEVMETHOD(device_attach, a64codec_attach), + DEVMETHOD(device_detach, a64codec_detach), + + DEVMETHOD(audio_dai_init, a64codec_dai_init), + DEVMETHOD(audio_dai_setup_mixer, a64codec_dai_setup_mixer), + DEVMETHOD(audio_dai_trigger, a64codec_dai_trigger), + + DEVMETHOD_END +}; + +static driver_t a64codec_driver = { + "a64codec", + a64codec_methods, + sizeof(struct a64codec_softc), +}; + +static devclass_t a64codec_devclass; + +DRIVER_MODULE(a64codec, simplebus, a64codec_driver, a64codec_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); diff --git a/sys/arm/allwinner/aw_i2s.c b/sys/arm/allwinner/aw_i2s.c new file mode 100644 index 000000000000..013e88a548a8 --- /dev/null +++ b/sys/arm/allwinner/aw_i2s.c @@ -0,0 +1,813 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * Copyright (c) 2018 Jared McNeill + * + * 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 ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include *** 805 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:38:43 2021 Return-Path: Delivered-To: dev-commits-src-main@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 A476B663649; Fri, 11 Jun 2021 19:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1rkC2yMPz4bX5; Fri, 11 Jun 2021 19:38:43 +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 49EF428B41; Fri, 11 Jun 2021 19:38:43 +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 15BJchws050920; Fri, 11 Jun 2021 19:38:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJchmR050919; Fri, 11 Jun 2021 19:38:43 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:38:43 GMT Message-Id: <202106111938.15BJchmR050919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: ab30bb8270fa - main - an: Deprecate the driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab30bb8270fa99503a0f204543a9ac3e3c7fa04d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:38:43 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ab30bb8270fa99503a0f204543a9ac3e3c7fa04d commit ab30bb8270fa99503a0f204543a9ac3e3c7fa04d Author: Emmanuel Vadot AuthorDate: 2021-06-07 16:45:58 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-11 19:17:34 +0000 an: Deprecate the driver Last an(4) devices have been End Of Life and End Of Sale in 2007. Time to remove this driver. Differential Revision: https://reviews.freebsd.org/D30678 Reviewed by: imp (earlier version), adrian (earlier version) MFC after: 3 days Sponsored by: Diablotin Systems --- share/man/man4/an.4 | 5 +++++ sys/dev/an/if_an.c | 1 + 2 files changed, 6 insertions(+) diff --git a/share/man/man4/an.4 b/share/man/man4/an.4 index aaa761a36b4d..1d624c0ae108 100644 --- a/share/man/man4/an.4 +++ b/share/man/man4/an.4 @@ -130,6 +130,11 @@ The .Nm device driver first appeared in .Fx 4.0 . +.Pp +The +.Nm +device driver was removed in +.Fx 14.0 . .Sh AUTHORS The .Nm diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index 205514bf0765..3a4db28f3eac 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -661,6 +661,7 @@ an_attach(struct an_softc *sc, int flags) int i, nrate, mword; u_int8_t r; + gone_in(14, "EOL/EOS in 2007"); ifp = sc->an_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(sc->an_dev, "can not if_alloc()\n"); From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:38:44 2021 Return-Path: Delivered-To: dev-commits-src-main@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 980E9663B81; Fri, 11 Jun 2021 19:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1rkD3mVbz4blS; Fri, 11 Jun 2021 19:38:44 +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 69C2E285F5; Fri, 11 Jun 2021 19:38:44 +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 15BJcisk050944; Fri, 11 Jun 2021 19:38:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJciAC050943; Fri, 11 Jun 2021 19:38:44 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:38:44 GMT Message-Id: <202106111938.15BJciAC050943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 663b174b5b53 - main - an: Remove driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 663b174b5b5387948bfa94131a08f6259d2926cc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:38:44 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=663b174b5b5387948bfa94131a08f6259d2926cc commit 663b174b5b5387948bfa94131a08f6259d2926cc Author: Emmanuel Vadot AuthorDate: 2021-06-07 16:48:00 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-11 19:18:04 +0000 an: Remove driver Last an(4) devices have been End Of Life and End Of Sale in 2007. Time to remove this driver. Differential Revision: https://reviews.freebsd.org/D30679 Reviewed by: imp (earlier version), emaste (earlier version) Sponsored by: Diablotin Systems --- ObsoleteFiles.inc | 5 + include/Makefile | 2 +- share/man/man4/an.4 | 142 -- sys/conf/files | 3 - sys/dev/an/if_aironet_ieee.h | 798 --------- sys/dev/an/if_an.c | 3820 ------------------------------------------ sys/dev/an/if_an_isa.c | 154 -- sys/dev/an/if_an_pci.c | 280 ---- sys/dev/an/if_anreg.h | 547 ------ sys/modules/Makefile | 2 - sys/modules/an/Makefile | 9 - 11 files changed, 6 insertions(+), 5756 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 7bc4f435f869..1b4c291a0c51 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20210607: remove an(4) +OLD_FILES+=usr/include/dev/an/if_aironet_ieee.h +OLD_FILES+=usr/include/dev/an/if_anreg.h +OLD_FILES+=usr/share/man/man4/an.4.gz + # 20210426: remove unused libexec/rc.d/addswap OLD_FILES+=etc/rc.d/addswap diff --git a/include/Makefile b/include/Makefile index b444184ab8c6..f5c0fc598b0c 100644 --- a/include/Makefile +++ b/include/Makefile @@ -41,7 +41,7 @@ LHDRS= aio.h errno.h fcntl.h linker_set.h poll.h stdatomic.h stdint.h \ LDIRS= geom net net80211 netgraph netinet netinet6 \ netipsec netsmb nfs nfsclient nfsserver sys vm -LSUBDIRS= dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ +LSUBDIRS= dev/acpica dev/agp dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ diff --git a/share/man/man4/an.4 b/share/man/man4/an.4 deleted file mode 100644 index 1d624c0ae108..000000000000 --- a/share/man/man4/an.4 +++ /dev/null @@ -1,142 +0,0 @@ -.\" Copyright (c) 1997, 1998, 1999 -.\" Bill Paul . All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Bill Paul. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD -.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -.\" THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd July 16, 2005 -.Dt AN 4 -.Os -.Sh NAME -.Nm an -.Nd "Aironet Communications 4500/4800 wireless network adapter driver" -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device an" -.Cd "device wlan" -.Ed -.Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -if_an_load="YES" -.Ed -.Sh DESCRIPTION -The -.Nm -driver provides support for Aironet Communications 4500 and 4800 -wireless network adapters and variants, including the following: -.Pp -.Bl -bullet -compact -offset indent -.It -Aironet Communications 4500 and 4800 series -.It -Cisco Aironet 340 and 350 series -.El -.Pp -Support for these devices include the ISA and PCI -varieties. -The Aironet 4500 series adapters operate at 1 and 2Mbps while -the Aironet 4800 series and Cisco adapters can operate at 1, 2, 5.5 and 11Mbps. -The ISA and PCI -devices are all based on the same core PCMCIA hardware -and all have the same programming interface. -The ISA and PCI cards appear to the -host as normal ISA and PCI devices. -.Pp -ISA cards can either be configured to use ISA Plug and Play -or to use a particular I/O address and IRQ -by properly setting the DIP switches on the board. -(The default -switch setting is for Plug and Play.) -The -.Nm -driver has Plug and Play support and will work in either configuration, -however when using a hard-wired I/O address and IRQ, the driver -configuration and the NIC's switch settings must agree. -PCI cards -require no switch settings of any kind and will be automatically -probed and attached. -.Pp -All host/device interaction with the Aironet cards is via programmed I/O. -The Aironet devices support 802.11 and 802.3 frames, power management, -BSS (infrastructure) and IBSS (ad-hoc) operation modes. -The -.Nm -driver encapsulates all IP and ARP traffic as 802.11 frames, however -it can receive either 802.11 or 802.3 frames. -Transmit speed is -selectable between 1Mbps, 2Mbps, 5.5Mbps, 11Mbps or -"auto" (the NIC automatically chooses the best speed). -.Pp -By default, the -.Nm -driver configures the Aironet card for infrastructure operation. -.Pp -For more information on configuring this device, see -.Xr ifconfig 8 . -.Sh DIAGNOSTICS -.Bl -diag -.It "an%d: init failed" -The Aironet card failed to become ready after an initialization command was -issued. -.It "an%d: failed to allocate %d bytes on NIC" -The driver was unable to allocate memory for transmit frames in the -NIC's on-board RAM. -.It "an%d: device timeout" -The Aironet card failed to generate an interrupt to acknowledge a transmit -command. -.El -.Sh SEE ALSO -.Xr altq 4 , -.Xr arp 4 , -.Xr miibus 4 , -.Xr netintro 4 , -.Xr wlan 4 , -.Xr ancontrol 8 , -.Xr ifconfig 8 -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 4.0 . -.Pp -The -.Nm -device driver was removed in -.Fx 14.0 . -.Sh AUTHORS -The -.Nm -driver was written by -.An Bill Paul Aq Mt wpaul@ee.columbia.edu . diff --git a/sys/conf/files b/sys/conf/files index d7e35b5f6c21..2b37d7f4e83e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -916,9 +916,6 @@ dev/amr/amr_cam.c optional amrp amr dev/amr/amr_disk.c optional amr dev/amr/amr_linux.c optional amr compat_linux dev/amr/amr_pci.c optional amr pci -dev/an/if_an.c optional an -dev/an/if_an_isa.c optional an isa -dev/an/if_an_pci.c optional an pci # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore diff --git a/sys/dev/an/if_aironet_ieee.h b/sys/dev/an/if_aironet_ieee.h deleted file mode 100644 index beb8a9c3a3be..000000000000 --- a/sys/dev/an/if_aironet_ieee.h +++ /dev/null @@ -1,798 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 1997, 1998, 1999 - * Bill Paul . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Bill Paul. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD - * 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$ - */ - -#ifndef _IF_AIRONET_IEEE_H -#define _IF_AIRONET_IEEE_H - -/* - * This header defines a simple command interface to the FreeBSD - * Aironet driver (an) driver, which is used to set certain - * device-specific parameters which can't be easily managed through - * ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_ - * interface, didn't I. - */ - -#ifndef SIOCSAIRONET -#define SIOCSAIRONET SIOCSIFGENERIC -#endif - -#ifndef SIOCGAIRONET -#define SIOCGAIRONET SIOCGIFGENERIC -#endif - -/* - * This is a make-predend RID value used only by the driver - * to allow the user to set the speed. - */ -#define AN_RID_TX_SPEED 0x1234 - -/* - * Technically I don't think there's a limit to a record - * length. The largest record is the one that contains the CIS - * data, which is 240 words long, so 256 should be a safe - * value. - */ -#define AN_MAX_DATALEN 4096 - -struct an_req { - u_int16_t an_len; - u_int16_t an_type; - u_int16_t an_val[AN_MAX_DATALEN]; -}; - -/* - * Private LTV records (interpreted only by the driver). This is - * a minor kludge to allow reading the interface statistics from - * the driver. - */ -#define AN_RID_IFACE_STATS 0x0100 -#define AN_RID_MGMT_XMIT 0x0200 -#ifdef ANCACHE -#define AN_RID_ZERO_CACHE 0x0300 -#define AN_RID_READ_CACHE 0x0400 -#endif - -#define AN_FCTL_VERS 0x0002 -#define AN_FCTL_FTYPE 0x000C -#define AN_FCTL_STYPE 0x00F0 -#define AN_FCTL_TODS 0x0100 -#define AN_FCTL_FROMDS 0x0200 -#define AN_FCTL_MOREFRAGS 0x0400 -#define AN_FCTL_RETRY 0x0800 -#define AN_FCTL_PM 0x1000 -#define AN_FCTL_MOREDATA 0x2000 -#define AN_FCTL_WEP 0x4000 -#define AN_FCTL_ORDER 0x8000 - -#define AN_FTYPE_MGMT 0x0000 -#define AN_FTYPE_CTL 0x0004 -#define AN_FTYPE_DATA 0x0008 - -#define AN_STYPE_MGMT_ASREQ 0x0000 /* association request */ -#define AN_STYPE_MGMT_ASRESP 0x0010 /* association response */ -#define AN_STYPE_MGMT_REASREQ 0x0020 /* reassociation request */ -#define AN_STYPE_MGMT_REASRESP 0x0030 /* reassociation response */ -#define AN_STYPE_MGMT_PROBEREQ 0x0040 /* probe request */ -#define AN_STYPE_MGMT_PROBERESP 0x0050 /* probe response */ -#define AN_STYPE_MGMT_BEACON 0x0080 /* beacon */ -#define AN_STYPE_MGMT_ATIM 0x0090 /* announcement traffic ind msg */ -#define AN_STYPE_MGMT_DISAS 0x00A0 /* disassociation */ -#define AN_STYPE_MGMT_AUTH 0x00B0 /* authentication */ -#define AN_STYPE_MGMT_DEAUTH 0x00C0 /* deauthentication */ - -/* - * Aironet IEEE signal strength cache - * - * driver keeps cache of last - * MAXANCACHE packets to arrive including signal strength info. - * daemons may read this via ioctl - * - * Each entry in the wi_sigcache has a unique macsrc. - */ -#ifdef ANCACHE -#define MAXANCACHE 10 - -struct an_sigcache { - char macsrc[6]; /* unique MAC address for entry */ - int ipsrc; /* ip address associated with packet */ - int signal; /* signal strength of the packet */ - int noise; /* noise value */ - int quality; /* quality of the packet */ -}; -#endif - -/* - * The card provides an 8-bit signal strength value (RSSI), which can - * be converted to a dBm power value (or a percent) using a table in - * the card's firmware (when available). The tables are slightly - * different in individual cards, even of the same model. If the - * table is not available, the mapping can be approximated by dBm = - * RSSI - 100. This approximation can be seen by plotting a few - * tables, and also matches some info on the Intersil web site (I - * think they make the RF front end for the cards. However, the linux - * driver uses the approximation dBm = RSSI/2 - 95. I think that is - * just wrong. - */ - -struct an_rssi_entry { - u_int8_t an_rss_pct; - u_int8_t an_rss_dbm; -}; - -struct an_ltv_key { - u_int16_t an_len; - u_int16_t an_type; - u_int16_t kindex; - u_int8_t mac[6]; - u_int16_t klen; - u_int8_t key[16]; /* 128-bit keys */ -}; - -struct an_ltv_stats { - u_int16_t an_fudge; - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* 0xXX */ - u_int16_t an_spacer; /* 0x02 */ - u_int32_t an_rx_overruns; /* 0x04 */ - u_int32_t an_rx_plcp_csum_errs; /* 0x08 */ - u_int32_t an_rx_plcp_format_errs; /* 0x0C */ - u_int32_t an_rx_plcp_len_errs; /* 0x10 */ - u_int32_t an_rx_mac_crc_errs; /* 0x14 */ - u_int32_t an_rx_mac_crc_ok; /* 0x18 */ - u_int32_t an_rx_wep_errs; /* 0x1C */ - u_int32_t an_rx_wep_ok; /* 0x20 */ - u_int32_t an_retry_long; /* 0x24 */ - u_int32_t an_retry_short; /* 0x28 */ - u_int32_t an_retry_max; /* 0x2C */ - u_int32_t an_no_ack; /* 0x30 */ - u_int32_t an_no_cts; /* 0x34 */ - u_int32_t an_rx_ack_ok; /* 0x38 */ - u_int32_t an_rx_cts_ok; /* 0x3C */ - u_int32_t an_tx_ack_ok; /* 0x40 */ - u_int32_t an_tx_rts_ok; /* 0x44 */ - u_int32_t an_tx_cts_ok; /* 0x48 */ - u_int32_t an_tx_lmac_mcasts; /* 0x4C */ - u_int32_t an_tx_lmac_bcasts; /* 0x50 */ - u_int32_t an_tx_lmac_ucast_frags; /* 0x54 */ - u_int32_t an_tx_lmac_ucasts; /* 0x58 */ - u_int32_t an_tx_beacons; /* 0x5C */ - u_int32_t an_rx_beacons; /* 0x60 */ - u_int32_t an_tx_single_cols; /* 0x64 */ - u_int32_t an_tx_multi_cols; /* 0x68 */ - u_int32_t an_tx_defers_no; /* 0x6C */ - u_int32_t an_tx_defers_prot; /* 0x70 */ - u_int32_t an_tx_defers_energy; /* 0x74 */ - u_int32_t an_rx_dups; /* 0x78 */ - u_int32_t an_rx_partial; /* 0x7C */ - u_int32_t an_tx_too_old; /* 0x80 */ - u_int32_t an_rx_too_old; /* 0x84 */ - u_int32_t an_lostsync_max_retries;/* 0x88 */ - u_int32_t an_lostsync_missed_beacons;/* 0x8C */ - u_int32_t an_lostsync_arl_exceeded;/*0x90 */ - u_int32_t an_lostsync_deauthed; /* 0x94 */ - u_int32_t an_lostsync_disassociated;/*0x98 */ - u_int32_t an_lostsync_tsf_timing; /* 0x9C */ - u_int32_t an_tx_host_mcasts; /* 0xA0 */ - u_int32_t an_tx_host_bcasts; /* 0xA4 */ - u_int32_t an_tx_host_ucasts; /* 0xA8 */ - u_int32_t an_tx_host_failed; /* 0xAC */ - u_int32_t an_rx_host_mcasts; /* 0xB0 */ - u_int32_t an_rx_host_bcasts; /* 0xB4 */ - u_int32_t an_rx_host_ucasts; /* 0xB8 */ - u_int32_t an_rx_host_discarded; /* 0xBC */ - u_int32_t an_tx_hmac_mcasts; /* 0xC0 */ - u_int32_t an_tx_hmac_bcasts; /* 0xC4 */ - u_int32_t an_tx_hmac_ucasts; /* 0xC8 */ - u_int32_t an_tx_hmac_failed; /* 0xCC */ - u_int32_t an_rx_hmac_mcasts; /* 0xD0 */ - u_int32_t an_rx_hmac_bcasts; /* 0xD4 */ - u_int32_t an_rx_hmac_ucasts; /* 0xD8 */ - u_int32_t an_rx_hmac_discarded; /* 0xDC */ - u_int32_t an_tx_hmac_accepted; /* 0xE0 */ - u_int32_t an_ssid_mismatches; /* 0xE4 */ - u_int32_t an_ap_mismatches; /* 0xE8 */ - u_int32_t an_rates_mismatches; /* 0xEC */ - u_int32_t an_auth_rejects; /* 0xF0 */ - u_int32_t an_auth_timeouts; /* 0xF4 */ - u_int32_t an_assoc_rejects; /* 0xF8 */ - u_int32_t an_assoc_timeouts; /* 0xFC */ - u_int32_t an_reason_outside_table;/* 0x100 */ - u_int32_t an_reason1; /* 0x104 */ - u_int32_t an_reason2; /* 0x108 */ - u_int32_t an_reason3; /* 0x10C */ - u_int32_t an_reason4; /* 0x110 */ - u_int32_t an_reason5; /* 0x114 */ - u_int32_t an_reason6; /* 0x118 */ - u_int32_t an_reason7; /* 0x11C */ - u_int32_t an_reason8; /* 0x120 */ - u_int32_t an_reason9; /* 0x124 */ - u_int32_t an_reason10; /* 0x128 */ - u_int32_t an_reason11; /* 0x12C */ - u_int32_t an_reason12; /* 0x130 */ - u_int32_t an_reason13; /* 0x134 */ - u_int32_t an_reason14; /* 0x138 */ - u_int32_t an_reason15; /* 0x13C */ - u_int32_t an_reason16; /* 0x140 */ - u_int32_t an_reason17; /* 0x144 */ - u_int32_t an_reason18; /* 0x148 */ - u_int32_t an_reason19; /* 0x14C */ - u_int32_t an_rx_mgmt_pkts; /* 0x150 */ - u_int32_t an_tx_mgmt_pkts; /* 0x154 */ - u_int32_t an_rx_refresh_pkts; /* 0x158 */ - u_int32_t an_tx_refresh_pkts; /* 0x15C */ - u_int32_t an_rx_poll_pkts; /* 0x160 */ - u_int32_t an_tx_poll_pkts; /* 0x164 */ - u_int32_t an_host_retries; /* 0x168 */ - u_int32_t an_lostsync_hostreq; /* 0x16C */ - u_int32_t an_host_tx_bytes; /* 0x170 */ - u_int32_t an_host_rx_bytes; /* 0x174 */ - u_int32_t an_uptime_usecs; /* 0x178 */ - u_int32_t an_uptime_secs; /* 0x17C */ - u_int32_t an_lostsync_better_ap; /* 0x180 */ - u_int32_t an_rsvd[15]; -}; - -/* - * General configuration information. - */ -struct an_ltv_genconfig { - /* General configuration. */ - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* XXXX */ - u_int16_t an_opmode; /* 0x02 */ - u_int16_t an_rxmode; /* 0x04 */ - u_int16_t an_fragthresh; /* 0x06 */ - u_int16_t an_rtsthresh; /* 0x08 */ - u_int8_t an_macaddr[6]; /* 0x0A */ - u_int8_t an_rates[8]; /* 0x10 */ - u_int16_t an_shortretry_limit; /* 0x18 */ - u_int16_t an_longretry_limit; /* 0x1A */ - u_int16_t an_tx_msdu_lifetime; /* 0x1C */ - u_int16_t an_rx_msdu_lifetime; /* 0x1E */ - u_int16_t an_stationary; /* 0x20 */ - u_int16_t an_ordering; /* 0x22 */ - u_int16_t an_devtype; /* 0x24 */ - u_int16_t an_rsvd0[5]; /* 0x26 */ - /* Scanning associating. */ - u_int16_t an_scanmode; /* 0x30 */ - u_int16_t an_probedelay; /* 0x32 */ - u_int16_t an_probe_energy_timeout;/* 0x34 */ - u_int16_t an_probe_response_timeout;/*0x36 */ - u_int16_t an_beacon_listen_timeout;/*0x38 */ - u_int16_t an_ibss_join_net_timeout;/*0x3A */ - u_int16_t an_auth_timeout; /* 0x3C */ - u_int16_t an_authtype; /* 0x3E */ - u_int16_t an_assoc_timeout; /* 0x40 */ - u_int16_t an_specified_ap_timeout;/* 0x42 */ - u_int16_t an_offline_scan_interval;/*0x44 */ - u_int16_t an_offline_scan_duration;/*0x46 */ - u_int16_t an_link_loss_delay; /* 0x48 */ - u_int16_t an_max_beacon_lost_time;/* 0x4A */ - u_int16_t an_refresh_interval; /* 0x4C */ - u_int16_t an_rsvd1; /* 0x4E */ - /* Power save operation */ - u_int16_t an_psave_mode; /* 0x50 */ - u_int16_t an_sleep_for_dtims; /* 0x52 */ - u_int16_t an_listen_interval; /* 0x54 */ - u_int16_t an_fast_listen_interval;/* 0x56 */ - u_int16_t an_listen_decay; /* 0x58 */ - u_int16_t an_fast_listen_decay; /* 0x5A */ - u_int16_t an_rsvd2[2]; /* 0x5C */ - /* Ad-hoc (or AP) operation. */ - u_int16_t an_beacon_period; /* 0x60 */ - u_int16_t an_atim_duration; /* 0x62 */ - u_int16_t an_rsvd3; /* 0x64 */ - u_int16_t an_ds_channel; /* 0x66 */ - u_int16_t an_rsvd4; /* 0x68 */ - u_int16_t an_dtim_period; /* 0x6A */ - u_int16_t an_rsvd5[2]; /* 0x6C */ - /* Radio operation. */ - u_int16_t an_radiotype; /* 0x70 */ - u_int16_t an_diversity; /* 0x72 */ - u_int16_t an_tx_power; /* 0x74 */ - u_int16_t an_rss_thresh; /* 0x76 */ - u_int16_t an_modulation_type; /* 0x78 */ - u_int16_t an_short_preamble; /* 0x7A */ - u_int16_t an_home_product; /* 0x7C */ - u_int16_t an_rsvd6; /* 0x7E */ - /* Aironet extensions. */ - u_int8_t an_nodename[16]; /* 0x80 */ - u_int16_t an_arl_thresh; /* 0x90 */ - u_int16_t an_arl_decay; /* 0x92 */ - u_int16_t an_arl_delay; /* 0x94 */ - u_int8_t an_rsvd7; /* 0x96 */ - u_int8_t an_rsvd8; /* 0x97 */ - u_int8_t an_magic_packet_action; /* 0x98 */ - u_int8_t an_magic_packet_ctl; /* 0x99 */ - u_int16_t an_rsvd9; - u_int16_t an_spare[19]; -}; - -#define AN_OPMODE_IBSS_ADHOC 0x0000 -#define AN_OPMODE_INFRASTRUCTURE_STATION 0x0001 -#define AN_OPMODE_AP 0x0002 -#define AN_OPMODE_AP_REPEATER 0x0003 -#define AN_OPMODE_UNMODIFIED_PAYLOAD 0x0100 -#define AN_OPMODE_AIRONET_EXTENSIONS 0x0200 -#define AN_OPMODE_AP_EXTENSIONS 0x0400 - -#define AN_RXMODE_BC_MC_ADDR 0x0000 -#define AN_RXMODE_BC_ADDR 0x0001 -#define AN_RXMODE_ADDR 0x0002 -#define AN_RXMODE_80211_MONITOR_CURBSS 0x0003 -#define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004 -#define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005 -#define AN_RXMODE_NO_8023_HEADER 0x0100 -#define AN_RXMODE_NORMALIZED_RSSI 0x0200 - -#define AN_RATE_1MBPS 0x0002 -#define AN_RATE_2MBPS 0x0004 -#define AN_RATE_5_5MBPS 0x000B -#define AN_RATE_11MBPS 0x0016 - -#define AN_DEVTYPE_PC4500 0x0065 -#define AN_DEVTYPE_PC4800 0x006D - -#define AN_SCANMODE_ACTIVE 0x0000 -#define AN_SCANMODE_PASSIVE 0x0001 -#define AN_SCANMODE_AIRONET_ACTIVE 0x0002 - -#define AN_AUTHTYPE_NONE 0x0000 -#define AN_AUTHTYPE_OPEN 0x0001 -#define AN_AUTHTYPE_SHAREDKEY 0x0002 -#define AN_AUTHTYPE_MASK 0x00ff -#define AN_AUTHTYPE_ENABLE 0x0100 -#define AN_AUTHTYPE_PRIVACY_IN_USE 0x0100 -#define AN_AUTHTYPE_ALLOW_UNENCRYPTED 0x0200 -#define AN_AUTHTYPE_LEAP 0x1000 - -#define AN_PSAVE_NONE 0x0000 -#define AN_PSAVE_CAM 0x0001 -#define AN_PSAVE_PSP 0x0002 -#define AN_PSAVE_PSP_CAM 0x0003 - -#define AN_RADIOTYPE_80211_FH 0x0001 -#define AN_RADIOTYPE_80211_DS 0x0002 -#define AN_RADIOTYPE_LM2000_DS 0x0004 - -#define AN_DIVERSITY_FACTORY_DEFAULT 0x0000 -#define AN_DIVERSITY_ANTENNA_1_ONLY 0x0001 -#define AN_DIVERSITY_ANTENNA_2_ONLY 0x0002 -#define AN_DIVERSITY_ANTENNA_1_AND_2 0x0003 - -#define AN_TXPOWER_FACTORY_DEFAULT 0x0000 -#define AN_TXPOWER_50MW 50 -#define AN_TXPOWER_100MW 100 -#define AN_TXPOWER_250MW 250 - -#define AN_HOME_NETWORK 0x0001 -#define AN_HOME_INSTALL_AP 0x0002 - -/* - * Valid SSID list. You can specify up to three SSIDs denoting - * the service sets that you want to join. The first SSID always - * defaults to "tsunami" which is a handy way to detect the - * card. - */ - -struct an_ltv_ssidlist { - u_int16_t an_len; - u_int16_t an_type; - u_int16_t an_ssid1_len; - char an_ssid1[32]; - u_int16_t an_ssid2_len; - char an_ssid2[32]; - u_int16_t an_ssid3_len; - char an_ssid3[32]; -}; - -struct an_ltv_ssid_entry{ - u_int16_t an_len; - char an_ssid[32]; -}; - -#define MAX_SSIDS 25 -struct an_ltv_ssidlist_new { - u_int16_t an_len; - u_int16_t an_type; - struct an_ltv_ssid_entry an_entry[MAX_SSIDS]; -}; - -/* - * Valid AP list. - */ -struct an_ltv_aplist { - u_int16_t an_len; - u_int16_t an_type; - u_int8_t an_ap1[8]; - u_int8_t an_ap2[8]; - u_int8_t an_ap3[8]; - u_int8_t an_ap4[8]; -}; - -/* - * Driver name. - */ -struct an_ltv_drvname { - u_int16_t an_len; - u_int16_t an_type; - u_int8_t an_drvname[16]; -}; - -/* - * Frame encapsulation. - */ -struct an_rid_encap { - u_int16_t an_len; - u_int16_t an_type; - u_int16_t an_ethertype_default; - u_int16_t an_action_default; - u_int16_t an_ethertype0; - u_int16_t an_action0; - u_int16_t an_ethertype1; - u_int16_t an_action1; - u_int16_t an_ethertype2; - u_int16_t an_action2; - u_int16_t an_ethertype3; - u_int16_t an_action3; - u_int16_t an_ethertype4; - u_int16_t an_action4; - u_int16_t an_ethertype5; - u_int16_t an_action5; - u_int16_t an_ethertype6; - u_int16_t an_action6; -}; - -#define AN_ENCAP_ACTION_RX 0x0001 -#define AN_ENCAP_ACTION_TX 0x0002 - -#define AN_RXENCAP_NONE 0x0000 -#define AN_RXENCAP_RFC1024 0x0001 - -#define AN_TXENCAP_RFC1024 0x0000 -#define AN_TXENCAP_80211 0x0002 - -/* - * Card capabilities (read only). - */ -struct an_ltv_caps { - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* XXXX */ - u_int8_t an_oui[3]; /* 0x02 */ - u_int8_t an_rsvd0; /* 0x05 */ - u_int16_t an_prodnum; /* 0x06 */ - u_int8_t an_manufname[32]; /* 0x08 */ - u_int8_t an_prodname[16]; /* 0x28 */ - u_int8_t an_prodvers[8]; /* 0x38 */ - u_int8_t an_oemaddr[6]; /* 0x40 */ - u_int8_t an_aironetaddr[6]; /* 0x46 */ - u_int16_t an_radiotype; /* 0x4C */ - u_int16_t an_regdomain; /* 0x4E */ - u_int8_t an_callid[6]; /* 0x50 */ - u_int8_t an_rates[8]; /* 0x56 */ - u_int8_t an_rx_diversity; /* 0x5E */ - u_int8_t an_tx_diversity; /* 0x5F */ - u_int16_t an_tx_powerlevels[8]; /* 0x60 */ - u_int16_t an_hwrev; /* 0x70 */ - u_int16_t an_hwcaps; /* 0x72 */ - u_int16_t an_temprange; /* 0x74 */ - u_int16_t an_fwrev; /* 0x76 */ - u_int16_t an_fwsubrev; /* 0x78 */ - u_int16_t an_ifacerev; /* 0x7A */ - u_int16_t an_softcaps; /* 0x7C */ - u_int16_t an_bootblockrev; /* 0x7E */ - u_int16_t an_req_hw_support; /* 0x80 */ - u_int16_t an_unknown[31]; /* 0x82 */ -}; - -/* - * Access point (read only) - */ -struct an_ltv_apinfo { - u_int16_t an_len; - u_int16_t an_type; - u_int16_t an_tim_addr; - u_int16_t an_airo_addr; -}; - -/* - * Radio info (read only). - */ -struct an_ltv_radioinfo { - u_int16_t an_len; - u_int16_t an_type; - /* ??? */ -}; - -/* - * RSSI map. If available in the card's firmware, this can be used to - * convert the 8-bit RSSI values from the card into dBm. - */ -struct an_ltv_rssi_map { - u_int16_t an_len; - u_int16_t an_type; - struct an_rssi_entry an_entries[256]; -}; - -/* - * Status (read only). Note: the manual claims this RID is 108 bytes - * long (0x6A is the last datum, which is 2 bytes long) however when - * this RID is read from the NIC, it returns a length of 110. To be - * on the safe side, this structure is padded with an extra 16-bit - * word. (There is a misprint in the manual which says the macaddr - * field is 8 bytes long.) - * - * Also, the channel_set and current_channel fields appear to be - * reversed. Either that, or the hop_period field is unused. - */ -struct an_ltv_status { - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* 0xXX */ - u_int8_t an_macaddr[6]; /* 0x02 */ - u_int16_t an_opmode; /* 0x08 */ - u_int16_t an_errcode; /* 0x0A */ - u_int16_t an_signal_quality; /* 0x0C */ - u_int16_t an_ssidlen; /* 0x0E */ - u_int8_t an_ssid[32]; /* 0x10 */ - u_int8_t an_ap_name[16]; /* 0x30 */ - u_int8_t an_cur_bssid[6]; /* 0x40 */ - u_int8_t an_prev_bssid1[6]; /* 0x46 */ - u_int8_t an_prev_bssid2[6]; /* 0x4C */ - u_int8_t an_prev_bssid3[6]; /* 0x52 */ - u_int16_t an_beacon_period; /* 0x58 */ - u_int16_t an_dtim_period; /* 0x5A */ - u_int16_t an_atim_duration; /* 0x5C */ - u_int16_t an_hop_period; /* 0x5E */ - u_int16_t an_cur_channel; /* 0x62 */ - u_int16_t an_channel_set; /* 0x60 */ - u_int16_t an_hops_to_backbone; /* 0x64 */ - u_int16_t an_ap_total_load; /* 0x66 */ - u_int16_t an_our_generated_load; /* 0x68 */ - u_int16_t an_accumulated_arl; /* 0x6A */ - u_int16_t an_cur_signal_quality; /* 0x6C */ - u_int16_t an_current_tx_rate; /* 0x6E */ - u_int16_t an_ap_device; /* 0x70 */ - u_int16_t an_normalized_strength; /* 0x72 */ - u_int16_t an_short_pre_in_use; /* 0x74 */ - u_int8_t an_ap_ip_addr[4]; /* 0x76 */ - u_int8_t an_noise_prev_sec_pc; /* 0x7A */ - u_int8_t an_noise_prev_sec_db; /* 0x7B */ - u_int8_t an_avg_noise_prev_min_pc; /* 0x7C */ - u_int8_t an_avg_noise_prev_min_db; /* 0x7D */ - u_int8_t an_max_noise_prev_min_pc; /* 0x7E */ - u_int8_t an_max_noise_prev_min_db; /* 0x7F */ - u_int16_t an_spare[18]; -}; - -#define AN_STATUS_OPMODE_CONFIGURED 0x0001 -#define AN_STATUS_OPMODE_MAC_ENABLED 0x0002 -#define AN_STATUS_OPMODE_RX_ENABLED 0x0004 -#define AN_STATUS_OPMODE_IN_SYNC 0x0010 -#define AN_STATUS_OPMODE_ASSOCIATED 0x0020 -#define AN_STATUS_OPMODE_LEAP 0x0040 -#define AN_STATUS_OPMODE_ERROR 0x8000 - -/* - * WEP Key - */ -struct an_ltv_wepkey { - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* 0xXX */ - u_int16_t an_key_index; /* 0x02 */ - u_int8_t an_mac_addr[6]; /* 0x04 */ - u_int16_t an_key_len; /* 0x0A */ - u_int8_t an_key[13]; /* 0x0C */ -}; - -/* - * Receive frame structure. - */ -struct an_rxframe { - u_int32_t an_rx_time; /* 0x00 */ - u_int16_t an_rx_status; /* 0x04 */ - u_int16_t an_rx_payload_len; /* 0x06 */ - u_int8_t an_rsvd0; /* 0x08 */ - u_int8_t an_rx_signal_strength; /* 0x09 */ - u_int8_t an_rx_rate; /* 0x0A */ - u_int8_t an_rx_chan; /* 0x0B */ - u_int8_t an_rx_assoc_cnt; /* 0x0C */ - u_int8_t an_rsvd1[3]; /* 0x0D */ - u_int8_t an_plcp_hdr[4]; /* 0x10 */ - u_int16_t an_frame_ctl; /* 0x14 */ - u_int16_t an_duration; /* 0x16 */ - u_int8_t an_addr1[6]; /* 0x18 */ - u_int8_t an_addr2[6]; /* 0x1E */ - u_int8_t an_addr3[6]; /* 0x24 */ - u_int16_t an_seq_ctl; /* 0x2A */ - u_int8_t an_addr4[6]; /* 0x2C */ - u_int8_t an_gaplen; /* 0x32 */ -} __packed; - -/* Do not modify this unless you are modifying LEAP itself */ -#define LEAP_USERNAME_MAX 32 -#define LEAP_PASSWORD_MAX 32 - -/* - * LEAP Username - */ -struct an_ltv_leap_username { - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* 0xXX */ - u_int16_t an_username_len; /* 0x02 */ - u_int8_t an_username[LEAP_USERNAME_MAX]; /* 0x04 */ -}; - -/* - * LEAP Password - */ -struct an_ltv_leap_password { - u_int16_t an_len; /* 0x00 */ - u_int16_t an_type; /* 0xXX */ - u_int16_t an_password_len; /* 0x02 */ - u_int8_t an_password[LEAP_PASSWORD_MAX]; /* 0x04 */ -}; - -/* - * These are all the LTV record types that we can read or write - * from the Aironet. Not all of them are temendously useful, but I - * list as many as I know about here for completeness. - */ - -/* - * Configuration (read/write) - */ -#define AN_RID_GENCONFIG 0xFF10 /* General configuration info */ -#define AN_RID_SSIDLIST 0xFF11 /* Valid SSID list */ -#define AN_RID_APLIST 0xFF12 /* Valid AP list */ -#define AN_RID_DRVNAME 0xFF13 /* ID name of this node for diag */ -#define AN_RID_ENCAPPROTO 0xFF14 /* Payload encapsulation type */ -#define AN_RID_WEP_TEMP 0xFF15 /* Temporary Key */ -#define AN_RID_WEP_PERM 0xFF16 /* Perminant Key */ -#define AN_RID_ACTUALCFG 0xFF20 /* Current configuration settings */ - -/* - * Reporting (read only) - */ -#define AN_RID_CAPABILITIES 0xFF00 /* PC 4500/4800 capabilities */ -#define AN_RID_AP_INFO 0xFF01 /* Access point info */ -#define AN_RID_RADIO_INFO 0xFF02 /* Radio info */ -#define AN_RID_RSSI_MAP 0xFF04 /* RSSI <-> dBm table */ -#define AN_RID_STATUS 0xFF50 /* Current status info */ -#define AN_RID_BEACONS_HST 0xFF51 -#define AN_RID_BUSY_HST 0xFF52 -#define AN_RID_RETRIES_HST 0xFF53 - -/* - * Statistics - */ -#define AN_RID_16BITS_CUM 0xFF60 /* Cumulative 16-bit stats counters */ -#define AN_RID_16BITS_DELTA 0xFF61 /* 16-bit stats (since last clear) */ -#define AN_RID_16BITS_DELTACLR 0xFF62 /* 16-bit stats, clear on read */ -#define AN_RID_32BITS_CUM 0xFF68 /* Cumulative 32-bit stats counters */ -#define AN_RID_32BITS_DELTA 0xFF69 /* 32-bit stats (since last clear) */ -#define AN_RID_32BITS_DELTACLR 0xFF6A /* 32-bit stats, clear on read */ - -/* - * LEAP - */ - -#define AN_RID_LEAPUSERNAME 0xFF23 /* Username */ -#define AN_RID_LEAPPASSWORD 0xFF24 /* Password */ - -/* - * OTHER Unknonwn for now - */ - -#define AN_RID_MOD 0xFF17 -#define AN_RID_OPTIONS 0xFF18 -#define AN_RID_FACTORY_CONFIG 0xFF18 - -/* - * FreeBSD fake RID - */ - -#define AN_RID_MONITOR_MODE 0x0001 /* Set monitor mode for driver */ -#define AN_MONITOR 1 -#define AN_MONITOR_ANY_BSS 2 -#define AN_MONITOR_INCLUDE_BEACON 4 -#define AN_MONITOR_AIRONET_HEADER 8 - -#define DLT_AIRONET_HEADER 120 /* Has been allocated at tcpdump.org */ - -/* - * from the Linux driver from Cisco ... no copyright header. - * Removed duplicated information that already existed in the FreeBSD driver - * provides emulation of the Cisco extensions to the Linux Aironet driver. - */ - -/* - * Ioctl constants to be used in airo_ioctl.command - */ - -#define AIROGCAP 0 /* Capability rid */ -#define AIROGCFG 1 /* USED A LOT */ -#define AIROGSLIST 2 /* System ID list */ -#define AIROGVLIST 3 /* List of specified AP's */ -#define AIROGDRVNAM 4 /* NOTUSED */ -#define AIROGEHTENC 5 /* NOTUSED */ -#define AIROGWEPKTMP 6 -#define AIROGWEPKNV 7 -#define AIROGSTAT 8 -#define AIROGSTATSC32 9 -#define AIROGSTATSD32 10 - -/* - * Leave gap of 40 commands after AIROGSTATSD32 *** 4900 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:38:46 2021 Return-Path: Delivered-To: dev-commits-src-main@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 05787663C0C; Fri, 11 Jun 2021 19:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1rkF6d01z4bZR; Fri, 11 Jun 2021 19:38:45 +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 9E3E7289A7; Fri, 11 Jun 2021 19:38:45 +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 15BJcjdc050968; Fri, 11 Jun 2021 19:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJcjOY050967; Fri, 11 Jun 2021 19:38:45 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:38:45 GMT Message-Id: <202106111938.15BJcjOY050967@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: d865da5edf7f - main - ancontrol: Remove an(4) utility MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d865da5edf7f77315ddecfd1b10a5b72ecf5af12 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:38:46 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d865da5edf7f77315ddecfd1b10a5b72ecf5af12 commit d865da5edf7f77315ddecfd1b10a5b72ecf5af12 Author: Emmanuel Vadot AuthorDate: 2021-06-07 16:48:57 +0000 Commit: Emmanuel Vadot CommitDate: 2021-06-11 19:18:21 +0000 ancontrol: Remove an(4) utility Last an(4) devices have been End Of Life and End Of Sale in 2007. Time to remove this driver. Differential Revision: https://reviews.freebsd.org/D30680 Reviewed by: imp (earlier version), emaste (earlier version) Sponsored by: Diablotin Systems --- ObsoleteFiles.inc | 4 + usr.sbin/Makefile | 1 - usr.sbin/ancontrol/Makefile | 11 - usr.sbin/ancontrol/Makefile.depend | 19 - usr.sbin/ancontrol/ancontrol.8 | 553 ----------- usr.sbin/ancontrol/ancontrol.c | 1781 ------------------------------------ 6 files changed, 4 insertions(+), 2365 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1b4c291a0c51..f61441307a06 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20210607: remove ancontrol(8) related programs +OLD_FILES+=usr/sbin/ancontrol +OLD_FILES+=usr/share/man/man8/ancontrol.8.gz + # 20210607: remove an(4) OLD_FILES+=usr/include/dev/an/if_aironet_ieee.h OLD_FILES+=usr/include/dev/an/if_anreg.h diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index ae568746119a..12285ad1d1fd 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -208,7 +208,6 @@ SUBDIR.${MK_USB}+= usbdump SUBDIR.${MK_UTMPX}+= ac SUBDIR.${MK_UTMPX}+= lastlogin SUBDIR.${MK_UTMPX}+= utx -SUBDIR.${MK_WIRELESS}+= ancontrol SUBDIR.${MK_WIRELESS}+= wlandebug SUBDIR.${MK_WIRELESS}+= wpa diff --git a/usr.sbin/ancontrol/Makefile b/usr.sbin/ancontrol/Makefile deleted file mode 100644 index 61dd02bf8481..000000000000 --- a/usr.sbin/ancontrol/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -PROG= ancontrol -MAN= ancontrol.8 - -WARNS?= 3 -CFLAGS+= -DANCACHE -I${SRCTOP}/sys - -LIBADD= md - -.include diff --git a/usr.sbin/ancontrol/Makefile.depend b/usr.sbin/ancontrol/Makefile.depend deleted file mode 100644 index 9dfb51c0b371..000000000000 --- a/usr.sbin/ancontrol/Makefile.depend +++ /dev/null @@ -1,19 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/arpa \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/libmd \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.sbin/ancontrol/ancontrol.8 b/usr.sbin/ancontrol/ancontrol.8 deleted file mode 100644 index 25fa5aefa061..000000000000 --- a/usr.sbin/ancontrol/ancontrol.8 +++ /dev/null @@ -1,553 +0,0 @@ -.\" Copyright (c) 1997, 1998, 1999 -.\" Bill Paul All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Bill Paul. -.\" 4. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD -.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -.\" THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd September 10, 1999 -.Dt ANCONTROL 8 -.Os -.Sh NAME -.Nm ancontrol -.Nd configure Aironet 4500/4800 devices -.Sh SYNOPSIS -.Nm -.Fl i Ar iface Fl A -.Nm -.Fl i Ar iface Fl N -.Nm -.Fl i Ar iface Fl S -.Nm -.Fl i Ar iface Fl I -.Nm -.Fl i Ar iface Fl T -.Nm -.Fl i Ar iface Fl C -.Nm -.Fl i Ar iface Fl Q -.Nm -.Fl i Ar iface Fl Z -.Nm -.Fl i Ar iface Fl R -.Nm -.Fl i Ar iface Fl t Cm 0 Ns - Ns Cm 4 -.Nm -.Fl i Ar iface Fl s Cm 0 Ns - Ns Cm 3 -.Nm -.Fl i Ar iface -.Op Fl v Cm 1 Ns - Ns Cm 4 -.Fl a Ar AP -.Nm -.Fl i Ar iface Fl b Ar beacon_period -.Nm -.Fl i Ar iface -.Op Fl v Cm 0 | 1 -.Fl d Cm 0 Ns - Ns Cm 3 -.Nm -.Fl i Ar iface Fl e Cm 0 Ns - Ns Cm 4 -.Nm -.Fl i Ar iface -.Op Fl v Cm 0 Ns - Ns Cm 8 -.Fl k Ar key -.Nm -.Fl i Ar iface -.Fl K Cm 0 Ns - Ns Cm 2 -.Nm -.Fl i Ar iface -.Fl W Cm 0 Ns - Ns Cm 2 -.Nm -.Fl i Ar iface -.Fl L Ar user_name -.Nm -.Fl i Ar iface Fl j Ar netjoin_timeout -.Nm -.Fl i Ar iface Fl l Ar station_name -.Nm -.Fl i Ar iface Fl m Ar mac_address -.Nm -.Fl i Ar iface -.Op Fl v Cm 1 Ns - Ns Cm 3 -.Fl n Ar SSID -.Nm -.Fl i Ar iface Fl o Cm 0 | 1 -.Nm -.Fl i Ar iface Fl p Ar tx_power -.Nm -.Fl i Ar iface Fl c Ar frequency -.Nm -.Fl i Ar iface Fl f Ar fragmentation_threshold -.Nm -.Fl i Ar iface Fl r Ar RTS_threshold -.Nm -.Fl i Ar iface Fl M Cm 0 Ns - Ns Cm 15 -.Nm -.Fl h -.Sh DESCRIPTION -The -.Nm -utility controls the operation of Aironet wireless networking -devices via the -.Xr an 4 -driver. -Most of the parameters that can be changed relate to the -IEEE 802.11 protocol which the Aironet cards implement. -This includes such things as -the station name, whether the station is operating in ad-hoc (point -to point) or infrastructure mode, and the network name of a service -set to join. -The -.Nm -utility can also be used to view the current NIC status, configuration -and to dump out the values of the card's statistics counters. -.Pp -The -.Ar iface -argument given to -.Nm -should be the logical interface name associated with the Aironet -device -.Li ( an0 , an1 , -etc.). -If one is not specified the device -.Dq Li an0 -will be assumed. -.Pp -The -.Nm -utility is not designed to support the combination of arguments from different -.Sx SYNOPSIS -lines in a single -.Nm -invocation, and such combinations are not recommended. -.Sh OPTIONS -The options are as follows: -.Bl -tag -width indent -.It Fl i Ar iface Fl A -Display the preferred access point list. -The AP list can be used by -stations to specify the MAC address of access points with which it -wishes to associate. -If no AP list is specified (the default) then -the station will associate with the first access point that it finds -which serves the SSID(s) specified in the SSID list. -The AP list can -be modified with the -.Fl a -option. -.It Fl i Ar iface Fl N -Display the SSID list. -This is a list of service set IDs (i.e., network names) -with which the station wishes to associate. -There may be up to three SSIDs -in the list: the station will go through the list in ascending order and -associate with the first matching SSID that it finds. -.It Fl i Ar iface Fl S -Display NIC status information. -This includes the current operating -status, current BSSID, SSID, channel, beacon period and currently -associated access point. -The operating mode indicates the state of -the NIC, MAC status and receiver status. -When the -.Qq Li synced -keyword -appears, it means the NIC has successfully associated with an access -point, associated with an ad-hoc -.Dq master -station, or become a -.Dq master -itself. -The beacon period can be anything between 20 and 976 milliseconds. -The default is 100. -.It Fl i Ar iface Fl I -Display NIC capability information. -This shows the device type, -frequency, speed and power level capabilities and firmware revision levels. -.It Fl i Ar iface Fl T -Display the NIC's internal statistics counters. -.It Fl i Ar iface Fl C -Display current NIC configuration. -This shows the current operation mode, -receive mode, MAC address, power save settings, various timing settings, -channel selection, diversity, transmit power and transmit speed. -.It Fl i Ar iface Fl Q -Display the cached signal strength information maintained by the -.Xr an 4 -driver. -The driver retains information about signal strength and -noise level for packets received from different hosts. -The signal strength and noise level values are displayed in units of dBms by -default. -The -.Va hw.an.an_cache_mode -.Xr sysctl 8 -variable can be set to -.Cm raw , dbm -or -.Cm per . -.It Fl i Ar iface Fl Z -Clear the signal strength cache maintained internally by the -.Xr an 4 -driver. -.It Fl i Ar iface Fl R -Display RSSI map that converts from the RSSI index to percent and dBm. -.It Fl i Ar iface Fl t Cm 0 Ns - Ns Cm 4 -Select transmit speed. -The available settings are as follows: -.Bl -column ".Em TX rate" -offset indent -.Em "TX rate NIC speed" -.It Cm 0 Ta "Auto -- NIC selects optimal speed" -.It Cm 1 Ta "1Mbps fixed" -.It Cm 2 Ta "2Mbps fixed" -.It Cm 3 Ta "5.5Mbps fixed" -.It Cm 4 Ta "11Mbps fixed" -.El -.Pp -Note that the 5.5 and 11Mbps settings are only supported on the 4800 -series adapters: the 4500 series adapters have a maximum speed of 2Mbps. -.It Fl i Ar iface Fl s Cm 0 Ns - Ns Cm 3 -Set power save mode. -Valid selections are as follows: -.Bl -column ".Em Selection" -offset indent -.Em "Selection Power save mode" -.It Cm 0 Ta "None - power save disabled" -.It Cm 1 Ta "Constantly awake mode (CAM)" -.It Cm 2 Ta "Power Save Polling (PSP)" -.It Cm 3 Ta "Fast Power Save Polling (PSP-CAM)" -.El -.Pp -Note that for IBSS (ad-hoc) mode, only PSP mode is supported, and only -if the ATIM window is non-zero. -.It Fl i Ar iface Oo Fl v Cm 1 Ns - Ns Cm 4 Oc Fl a Ar AP -Set preferred access point. -The -.Ar AP -is specified as a MAC address consisting of 6 hexadecimal values -separated by colons. -By default, the -.Fl a -option only sets the first entry in the AP list. -The -.Fl v -modifier can be used to specify exactly which AP list entry is to be -modified. -If the -.Fl v -flag is not used, the first AP list entry will be changed. -.It Fl i Ar iface Fl b Ar beacon_period -Set the ad-hoc mode beacon period. -The -.Ar beacon_period -is specified in milliseconds. -The default is 100ms. -.It Fl i Ar iface Oo Fl v Cm 0 | 1 Oc Fl d Cm 0 Ns - Ns Cm 3 -Select the antenna diversity. -Aironet devices can be configured with up -to two antennas, and transmit and receive diversity can be configured -accordingly. -Valid selections are as follows: -.Bl -column ".Em Selection" -offset indent -.Em "Selection Diversity" -.It Cm 0 Ta "Select factory default diversity" -.It Cm 1 Ta "Antenna 1 only" -.It Cm 2 Ta "Antenna 2 only" -.It Cm 3 Ta "Antenna 1 and 2" -.El -.Pp -The receive and transmit diversity can be set independently. -The user -must specify which diversity setting is to be modified by using the -.Fl v -option: selection -.Cm 0 -sets the receive diversity and -.Cm 1 -sets the transmit diversity. -.It Fl i Ar iface Fl e Cm 0 Ns - Ns Cm 4 -Set the transmit WEP key to use. -Note that until this command is issued, the device will use the -last key programmed. -The transmit key is stored in NVRAM. -Currently -set transmit key can be checked via -.Fl C -option. -Selection -.Cm 4 -sets the card in -.Dq "Home Network Mode" -and uses the home key. -.It Fl i Ar iface Oo Fl v Cm 0 Ns - Ns Cm 8 Oc Fl k Ar key -Set a WEP key. -For 40 bit prefix 10 hex character with 0x. -For 128 bit prefix 26 hex character with 0x. -Use -.Qq -as the key to erase the key. -Supports 4 keys; even numbers are for permanent keys -and odd number are for temporary keys. -For example, -.Fl v Cm 1 -sets the first temporary key. -(A -.Dq permanent -key is stored in NVRAM; a -.Dq temporary -key is not.) -Note that the device will use the most recently-programmed key by default. -Currently set keys can be checked via -.Fl C -option, only the sizes of the -keys are returned. -The value of -.Cm 8 -is for the home key. -Note that the value for the home key can be read back from firmware. -.It Fl i Ar iface Fl K Cm 0 Ns - Ns Cm 2 -Set authorization type. -Use -.Cm 0 -for none, -.Cm 1 -for -.Dq Open , -.Cm 2 -for -.Dq "Shared Key" . -.It Fl i Ar iface Fl W Cm 0 Ns - Ns Cm 2 -Enable WEP. -Use -.Cm 0 -for no WEP, -.Cm 1 -to enable full WEP, -.Cm 2 -for mixed cell. -.It Fl i Ar iface Fl L Ar user_name -Enable LEAP and query for password. -It will check to see if it has authenticated for up to 60s. -To disable LEAP, set WEP mode. -.It Fl i Ar iface Fl j Ar netjoin_timeout -Set the ad-hoc network join timeout. -When a station is first activated -in ad-hoc mode, it will search out a -.Dq master -station with the desired -SSID and associate with it. -If the station is unable to locate another -station with the same SSID after a suitable timeout, it sets itself up -as the -.Dq master -so that other stations may associate with it. -This -timeout defaults to 10000 milliseconds (10 seconds) but may be changed -with this option. -The timeout should be specified in milliseconds. -.It Fl i Ar iface Fl l Ar station_name -Set the station name used internally by the NIC. -The -.Ar station_name -can be any text string up to 16 characters in length. -The default name -is set by the driver to -.Dq Li FreeBSD . -.It Fl i Ar iface Fl m Ar mac_address -Set the station address for the specified interface. -The -.Ar mac_address -is specified as a series of six hexadecimal values separated by colons, -e.g.: -.Li 00:60:1d:12:34:56 . -This programs the new address into the card -and updates the interface as well. -.It Fl i Ar iface Oo Fl v Cm 1 Ns - Ns Cm 3 Oc Fl n Ar SSID -Set the desired SSID (network name). -There are three SSIDs which allows -the NIC to work with access points at several locations without needing -to be reconfigured. -The NIC checks each SSID in sequence when searching -for a match. -The SSID to be changed can be specified with the -.Fl v -modifier option. -If the -.Fl v -flag is not used, the first SSID in the list is set. -.It Fl i Ar iface Fl o Cm 0 | 1 -Set the operating mode of the Aironet interface. -Valid selections are -.Cm 0 -for ad-hoc mode and -.Cm 1 -for infrastructure mode. -The default driver setting is for infrastructure -mode. -.It Fl i Ar iface Fl p Ar tx_power -Set the transmit power level in milliwatts. -Valid power settings -vary depending on the actual NIC and can be viewed by dumping the -device capabilities with the -.Fl I -flag. -Typical values are 1, 5, 20, 50 and 100mW. -Selecting 0 sets -the factory default. -.It Fl i Ar iface Fl c Ar frequency -Set the radio frequency of a given interface. -The -.Ar frequency -should be specified as a channel ID as shown in the table below. -The -list of available frequencies is dependent on radio regulations specified -by regional authorities. -Recognized regulatory authorities include -the FCC (United States), ETSI (Europe), France and Japan. -Frequencies -in the table are specified in MHz. -.Bl -column ".Em Channel ID" ".Em FCC" ".Em ETSI" ".Em France" ".Em Japan" -offset indent -.Em "Channel ID FCC ETSI France Japan" -.It Cm 1 Ta 2412 Ta 2412 Ta - Ta - -.It Cm 2 Ta 2417 Ta 2417 Ta - Ta - -.It Cm 3 Ta 2422 Ta 2422 Ta - Ta - -.It Cm 4 Ta 2427 Ta 2427 Ta - Ta - -.It Cm 5 Ta 2432 Ta 2432 Ta - Ta - -.It Cm 6 Ta 2437 Ta 2437 Ta - Ta - -.It Cm 7 Ta 2442 Ta 2442 Ta - Ta - -.It Cm 8 Ta 2447 Ta 2447 Ta - Ta - -.It Cm 9 Ta 2452 Ta 2452 Ta - Ta - -.It Cm 10 Ta 2457 Ta 2457 Ta 2457 Ta - -.It Cm 11 Ta 2462 Ta 2462 Ta 2462 Ta - -.It Cm 12 Ta - Ta 2467 Ta 2467 Ta - -.It Cm 13 Ta - Ta 2472 Ta 2472 Ta - -.It Cm 14 Ta - Ta - Ta - Ta 2484 -.El -.Pp -If an illegal channel is specified, the -NIC will revert to its default channel. -For NICs sold in the United States -and Europe, the default channel is 3. -For NICs sold in France, the default -channel is 11. -For NICs sold in Japan, the only available channel is 14. -Note that two stations must be set to the same channel in order to -communicate. -.It Fl i Ar iface Fl f Ar fragmentation_threshold -Set the fragmentation threshold in bytes. -This threshold controls the -point at which outgoing packets will be split into multiple fragments. -If a single fragment is not sent successfully, only that fragment will -need to be retransmitted instead of the whole packet. -The fragmentation -threshold can be anything from 64 to 2312 bytes. -The default is 2312. -.It Fl i Ar iface Fl r Ar RTS_threshold -Set the RTS/CTS threshold for a given interface. -This controls the -number of bytes used for the RTS/CTS handshake boundary. -The -.Ar RTS_threshold -can be any value between 0 and 2312. -The default is 2312. -.It Fl i Ar iface Fl M Cm 0 Ns - Ns Cm 15 -Set monitor mode via bit mask, meaning: -.Pp -.Bl -tag -width indent -offset indent -compact -.It Em Bit -.Em Meaning -.It 0 -to not dump 802.11 packet. -.It 1 -to enable 802.11 monitor. -.It 2 -to monitor any SSID. -.It 4 -to not skip beacons, monitor beacons produces a high system load. -.It 8 -to enable full Aironet header returned via BPF. -Note it appears that a SSID must be set. -.El -.It Fl h -Print a list of available options and sample usage. -.El -.Sh SECURITY NOTES -WEP -.Pq Dq "wired equivalent privacy" -is based on the RC4 algorithm, -using a 24 bit initialization vector. -.Pp -RC4 is supposedly vulnerable to certain known plaintext attacks, -especially with 40 bit keys. -So the security of WEP in part depends on how much known plaintext -is transmitted. -.Pp -Because of this, although counter-intuitive, using -.Dq "shared key" -authentication (which involves sending known plaintext) is less -secure than using -.Dq open -authentication when WEP is enabled. -.Pp -Devices may alternate among all of the configured WEP keys when -transmitting packets. -Therefore, all configured keys (up to four) must agree. -.Sh EXAMPLES -.Bd -literal -offset indent -ancontrol -i an0 -v 0 -k 0x12345678901234567890123456 -ancontrol -i an0 -K 2 -ancontrol -i an0 -W 1 -ancontrol -i an0 -e 0 -.Ed -.Pp -Sets a WEP key 0, enables -.Dq "Shared Key" -authentication, enables full WEP -and uses transmit key 0. -.Sh SEE ALSO -.Xr an 4 , -.Xr ifconfig 8 -.Sh HISTORY -The -.Nm -utility first appeared in -.Fx 4.0 . -.Sh AUTHORS -The -.Nm -utility was written by -.An Bill Paul Aq Mt wpaul@ee.columbia.edu . -.Sh BUGS -The statistics counters do not seem to show the amount of transmit -and received frames as increasing. -This is likely due to the fact that -the -.Xr an 4 -driver uses unmodified packet mode instead of letting the NIC perform -802.11/ethernet encapsulation itself. -.Pp -Setting the channel does not seem to have any effect. diff --git a/usr.sbin/ancontrol/ancontrol.c b/usr.sbin/ancontrol/ancontrol.c deleted file mode 100644 index 6d76f0770f4a..000000000000 --- a/usr.sbin/ancontrol/ancontrol.c +++ /dev/null @@ -1,1781 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright 1997, 1998, 1999 - * Bill Paul . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Bill Paul. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD - * 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. - */ - -#if 0 -#ifndef lint -static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\ - Bill Paul. All rights reserved."; -#endif -#endif -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static int an_getval(const char *, struct an_req *); -static void an_setval(const char *, struct an_req *); -static void an_printwords(const u_int16_t *, int); -static void an_printspeeds(const u_int8_t *, int); -static void an_printbool(int); -static void an_printhex(const char *, int); -static void an_printstr(char *, int); -static void an_dumpstatus(const char *); -static void an_dumpstats(const char *); -static void an_dumpconfig(const char *); -static void an_dumpcaps(const char *); -static void an_dumpssid(const char *); -static void an_dumpap(const char *); -static void an_setconfig(const char *, int, void *); -static void an_setssid(const char *, int, void *); -static void an_setap(const char *, int, void *); -static void an_setspeed(const char *, int, void *); -static void an_readkeyinfo(const char *); -#ifdef ANCACHE -static void an_zerocache(const char *); -static void an_readcache(const char *); -#endif -static int an_hex2int(char); -static void an_str2key(const char *, struct an_ltv_key *); -static void an_setkeys(const char *, const char *, int); -static void an_enable_tx_key(const char *, const char *); -static void an_enable_leap_mode(const char *, const char *); -static void an_dumprssimap(const char *); -static void usage(const char *); - -#define ACT_DUMPSTATS 1 -#define ACT_DUMPCONFIG 2 -#define ACT_DUMPSTATUS 3 -#define ACT_DUMPCAPS 4 -#define ACT_DUMPSSID 5 -#define ACT_DUMPAP 6 - -#define ACT_SET_OPMODE 7 -#define ACT_SET_SSID 8 -#define ACT_SET_FREQ 11 -#define ACT_SET_AP1 12 -#define ACT_SET_AP2 13 -#define ACT_SET_AP3 14 -#define ACT_SET_AP4 15 -#define ACT_SET_DRIVERNAME 16 -#define ACT_SET_SCANMODE 17 -#define ACT_SET_TXRATE 18 -#define ACT_SET_RTS_THRESH 19 -#define ACT_SET_PWRSAVE 20 -#define ACT_SET_DIVERSITY_RX 21 -#define ACT_SET_DIVERSITY_TX 22 -#define ACT_SET_RTS_RETRYLIM 23 -#define ACT_SET_WAKE_DURATION 24 -#define ACT_SET_BEACON_PERIOD 25 -#define ACT_SET_TXPWR 26 -#define ACT_SET_FRAG_THRESH 27 -#define ACT_SET_NETJOIN 28 -#define ACT_SET_MYNAME 29 -#define ACT_SET_MAC 30 - -#define ACT_DUMPCACHE 31 -#define ACT_ZEROCACHE 32 - -#define ACT_ENABLE_WEP 33 -#define ACT_SET_KEY_TYPE 34 -#define ACT_SET_KEYS 35 -#define ACT_ENABLE_TX_KEY 36 -#define ACT_SET_MONITOR_MODE 37 -#define ACT_SET_LEAP_MODE 38 - -#define ACT_DUMPRSSIMAP 39 - -static int -an_getval(const char *iface, struct an_req *areq) -{ - struct ifreq ifr; - int s, okay = 1; - - bzero(&ifr, sizeof(ifr)); - - strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); - ifr.ifr_data = (caddr_t)areq; - - s = socket(AF_INET, SOCK_DGRAM, 0); - - if (s == -1) - err(1, "socket"); - - if (ioctl(s, SIOCGAIRONET, &ifr) == -1) { - okay = 0; - err(1, "SIOCGAIRONET"); - } - - close(s); - - return (okay); -} - -static void -an_setval(const char *iface, struct an_req *areq) -{ - struct ifreq ifr; - int s; - - bzero(&ifr, sizeof(ifr)); - - strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); - ifr.ifr_data = (caddr_t)areq; - - s = socket(AF_INET, SOCK_DGRAM, 0); - - if (s == -1) - err(1, "socket"); - - if (ioctl(s, SIOCSAIRONET, &ifr) == -1) - err(1, "SIOCSAIRONET"); - - close(s); - - return; -} - -static void -an_printstr(char *str, int len) -{ - int i; - - for (i = 0; i < len - 1; i++) { - if (str[i] == '\0') - str[i] = ' '; - } - - printf("[ %.*s ]", len, str); -} - -static void -an_printwords(const u_int16_t *w, int len) -{ - int i; - - printf("[ "); - for (i = 0; i < len; i++) - printf("%u ", w[i]); - printf("]"); -} - -static void -an_printspeeds(const u_int8_t *w, int len) -{ - int i; - - printf("[ "); - for (i = 0; i < len && w[i]; i++) - printf("%2.1fMbps ", w[i] * 0.500); - printf("]"); -} - -static void -an_printbool(int val) -{ - if (val) - printf("[ On ]"); - else - printf("[ Off ]"); -} - -static void -an_printhex(const char *ptr, int len) -{ - int i; - - printf("[ "); - for (i = 0; i < len; i++) { - printf("%02x", ptr[i] & 0xFF); - if (i < (len - 1)) - printf(":"); - } - - printf(" ]"); -} - - - -static void -an_dumpstatus(const char *iface) -{ - struct an_ltv_status *sts; - struct an_req areq; - struct an_ltv_rssi_map an_rssimap; - int rssimap_valid = 0; - - /* - * Try to get RSSI to percent and dBM table - */ - - an_rssimap.an_len = sizeof(an_rssimap); - an_rssimap.an_type = AN_RID_RSSI_MAP; - rssimap_valid = an_getval(iface, (struct an_req*)&an_rssimap); - - if (rssimap_valid) - printf("RSSI table:\t\t[ present ]\n"); - else - printf("RSSI table:\t\t[ not available ]\n"); - - areq.an_len = sizeof(areq); - areq.an_type = AN_RID_STATUS; - - an_getval(iface, &areq); - - sts = (struct an_ltv_status *)&areq; - - printf("MAC address:\t\t"); - an_printhex((char *)&sts->an_macaddr, ETHER_ADDR_LEN); - printf("\nOperating mode:\t\t[ "); - if (sts->an_opmode & AN_STATUS_OPMODE_CONFIGURED) - printf("configured "); - if (sts->an_opmode & AN_STATUS_OPMODE_MAC_ENABLED) - printf("MAC ON "); - if (sts->an_opmode & AN_STATUS_OPMODE_RX_ENABLED) - printf("RX ON "); - if (sts->an_opmode & AN_STATUS_OPMODE_IN_SYNC) - printf("synced "); - if (sts->an_opmode & AN_STATUS_OPMODE_ASSOCIATED) - printf("associated "); - if (sts->an_opmode & AN_STATUS_OPMODE_LEAP) - printf("LEAP "); - if (sts->an_opmode & AN_STATUS_OPMODE_ERROR) - printf("error "); - printf("]\n"); - printf("Error code:\t\t"); - an_printhex((char *)&sts->an_errcode, 1); - if (rssimap_valid) - printf("\nSignal strength:\t[ %u%% ]", - an_rssimap.an_entries[ - sts->an_normalized_strength].an_rss_pct); - else - printf("\nSignal strength:\t[ %u%% ]", - sts->an_normalized_strength); - printf("\nAverage Noise:\t\t[ %u%% ]", sts->an_avg_noise_prev_min_pc); - if (rssimap_valid) - printf("\nSignal quality:\t\t[ %u%% ]", - an_rssimap.an_entries[ - sts->an_cur_signal_quality].an_rss_pct); - else - printf("\nSignal quality:\t\t[ %u ]", - sts->an_cur_signal_quality); - printf("\nMax Noise:\t\t[ %u%% ]", sts->an_max_noise_prev_min_pc); - /* - * XXX: This uses the old definition of the rate field (units of - * 500kbps). Technically the new definition is that this field - * contains arbitrary values, but no devices which need this - * support exist and the IEEE seems to intend to use the old - * definition until they get something big so we'll keep using - * it as well because this will work with new cards with - * rate <= 63.5Mbps. - */ - printf("\nCurrent TX rate:\t[ %u%s ]", sts->an_current_tx_rate / 2, - (sts->an_current_tx_rate % 2) ? ".5" : ""); - printf("\nCurrent SSID:\t\t"); - an_printstr((char *)&sts->an_ssid, sts->an_ssidlen); - printf("\nCurrent AP name:\t"); - an_printstr((char *)&sts->an_ap_name, 16); - printf("\nCurrent BSSID:\t\t"); *** 1455 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:54:21 2021 Return-Path: Delivered-To: dev-commits-src-main@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 EE8D266394B; Fri, 11 Jun 2021 19:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1s4F6QdGz4clY; Fri, 11 Jun 2021 19:54: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 C106C28E90; Fri, 11 Jun 2021 19:54: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 15BJsLHv076517; Fri, 11 Jun 2021 19:54:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJsLGW076516; Fri, 11 Jun 2021 19:54:21 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:54:21 GMT Message-Id: <202106111954.15BJsLGW076516@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6f4c1456b51d - main - bsdinstall: Allow automation in jails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f4c1456b51dc35c03b2c02cc06e8b4308779855 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:54:22 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6f4c1456b51dc35c03b2c02cc06e8b4308779855 commit 6f4c1456b51dc35c03b2c02cc06e8b4308779855 Author: eoli3n AuthorDate: 2021-06-07 20:49:02 +0000 Commit: Warner Losh CommitDate: 2021-06-11 19:53:17 +0000 bsdinstall: Allow automation in jails Set SCRIPT=/path/to/script env var to be able to automate bsdinstall to a jail. Pull Request: https://github.com/freebsd/freebsd-src/pull/473 Reviewed by: allanjude --- usr.sbin/bsdinstall/scripts/jail | 58 +++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index ecfbb78357d9..d9b5c8eb3cb4 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -52,11 +52,16 @@ error() { fi } - rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC mkdir -p $1 || error "mkdir failed for $1" +if [ -n "$SCRIPT" ] +then + split -a 2 -p '^#!.*' "$SCRIPT" $TMPDIR/bsdinstall-installscript- + . $TMPDIR/bsdinstall-installscript-aa +fi + test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then @@ -69,20 +74,23 @@ if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST" fi -export DISTRIBUTIONS="base.txz" +: ${DISTRIBUTIONS="base.txz"}; export DISTRIBUTIONS if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base` - exec 3>&1 - EXTRA_DISTS=$(echo $DISTMENU | xargs dialog \ - --backtitle "FreeBSD Installer" \ - --title "Distribution Select" --nocancel --separate-output \ - --checklist "Choose optional system components to install:" \ - 0 0 0 \ - 2>&1 1>&3) - for dist in $EXTRA_DISTS; do - export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" - done + if [ ! "$nonInteractive" == "YES" ] + then + exec 3>&1 + EXTRA_DISTS=$(echo $DISTMENU | xargs dialog \ + --backtitle "FreeBSD Installer" \ + --title "Distribution Select" --nocancel --separate-output \ + --checklist "Choose optional system components to install:" \ + 0 0 0 \ + 2>&1 1>&3) + for dist in $EXTRA_DISTS; do + export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" + done + fi fi FETCH_DISTRIBUTIONS="" @@ -108,20 +116,38 @@ fi bsdinstall checksum || error "Distribution checksum failed" bsdinstall distextract || error "Distribution extract failed" -bsdinstall rootpass || error "Could not set root password" + +if [ ! "$nonInteractive" == "YES" ] +then + bsdinstall rootpass || error "Could not set root password" +fi trap true SIGINT # This section is optional + +if [ ! "$nonInteractive" == "YES" ] +then bsdinstall services -dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ - "Would you like to add users to the installed system now?" 0 0 && \ - bsdinstall adduser + dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ + "Would you like to add users to the installed system now?" 0 0 && \ + bsdinstall adduser +fi trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" cp /etc/resolv.conf $1/etc cp /etc/localtime $1/etc +# Run post-install script +if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then + cp $TMPDIR/bsdinstall-installscript-ab $BSDINSTALL_CHROOT/tmp/installscript + chmod a+x $BSDINSTALL_CHROOT/tmp/installscript + mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" + chroot $BSDINSTALL_CHROOT /tmp/installscript $@ 2>&1 + umount "$BSDINSTALL_CHROOT/dev" + rm $BSDINSTALL_CHROOT/tmp/installscript +fi + bsdinstall entropy f_dprintf "Installation Completed at %s" "$(date)" From owner-dev-commits-src-main@freebsd.org Fri Jun 11 19:59:53 2021 Return-Path: Delivered-To: dev-commits-src-main@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 7A822663FE4; Fri, 11 Jun 2021 19:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1sBd33xPz4cWq; Fri, 11 Jun 2021 19:59: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 5158C28E91; Fri, 11 Jun 2021 19:59: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 15BJxrQQ077010; Fri, 11 Jun 2021 19:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BJxrvo077009; Fri, 11 Jun 2021 19:59:53 GMT (envelope-from git) Date: Fri, 11 Jun 2021 19:59:53 GMT Message-Id: <202106111959.15BJxrvo077009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b0e54e61b390 - main - Change "compiled" to "assembled" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0e54e61b390330a183e47fc62260ee3dcb39d09 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 19:59:53 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b0e54e61b390330a183e47fc62260ee3dcb39d09 commit b0e54e61b390330a183e47fc62260ee3dcb39d09 Author: Warner Losh AuthorDate: 2021-06-11 19:58:51 +0000 Commit: Warner Losh CommitDate: 2021-06-11 19:58:51 +0000 Change "compiled" to "assembled" Assembly files are assembled, not compiled. Submitted by: github user gAlfonso-bit Pull Request: https://github.com/freebsd/freebsd-src/pull/474 Sponsored by: Netflix --- sys/dev/hyperv/vmbus/i386/vmbus_vector.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S index d119cfdc5b12..b1ffe89cd55d 100644 --- a/sys/dev/hyperv/vmbus/i386/vmbus_vector.S +++ b/sys/dev/hyperv/vmbus/i386/vmbus_vector.S @@ -36,7 +36,7 @@ * This is the Hyper-V vmbus channel direct callback interrupt. * Only used when it is running on Hyper-V. * - * Note that this file is not compiled directly, it is included into + * Note that this file is not assembled directly, it is included into * i386/exception.s. */ .text From owner-dev-commits-src-main@freebsd.org Fri Jun 11 20:30:47 2021 Return-Path: Delivered-To: dev-commits-src-main@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 B3E62664350; Fri, 11 Jun 2021 20:30:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1stH4Cjxz4fT5; Fri, 11 Jun 2021 20:30:47 +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 7931329615; Fri, 11 Jun 2021 20:30:47 +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 15BKUl7X026012; Fri, 11 Jun 2021 20:30:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BKUlMd026011; Fri, 11 Jun 2021 20:30:47 GMT (envelope-from git) Date: Fri, 11 Jun 2021 20:30:47 GMT Message-Id: <202106112030.15BKUlMd026011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 768787bee30d - main - mtk: Initialize mask correctly. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 768787bee30dd86f5060f1083745955e2cbcf28f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 20:30:47 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=768787bee30dd86f5060f1083745955e2cbcf28f commit 768787bee30dd86f5060f1083745955e2cbcf28f Author: Priit Trees AuthorDate: 2021-06-11 20:12:08 +0000 Commit: Warner Losh CommitDate: 2021-06-11 20:12:08 +0000 mtk: Initialize mask correctly. Initialization of mask is missing. Fixes a compile issue. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/459 --- sys/mips/mediatek/mtk_clock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/mips/mediatek/mtk_clock.c b/sys/mips/mediatek/mtk_clock.c index 83433fbd8ff9..915207b755af 100644 --- a/sys/mips/mediatek/mtk_clock.c +++ b/sys/mips/mediatek/mtk_clock.c @@ -123,6 +123,8 @@ mtk_clock_get_info(device_t dev, int index, struct fdt_clock_info *info) if (index < 0 || index > 31 || info == NULL) return (EINVAL); + mask = (1u << index); + if (mtk_sysctl_get(SYSCTL_CLKCFG1) & mask) info->flags = FDT_CIFLAG_RUNNING; else From owner-dev-commits-src-main@freebsd.org Fri Jun 11 20:30:49 2021 Return-Path: Delivered-To: dev-commits-src-main@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 1DF2466480A; Fri, 11 Jun 2021 20:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1stJ5XMpz4fTD; Fri, 11 Jun 2021 20:30: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 A22182951D; Fri, 11 Jun 2021 20:30: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 15BKUmgI026043; Fri, 11 Jun 2021 20:30:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BKUmu8026042; Fri, 11 Jun 2021 20:30:48 GMT (envelope-from git) Date: Fri, 11 Jun 2021 20:30:48 GMT Message-Id: <202106112030.15BKUmu8026042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7700494d9603 - main - mtk: Add printing of CPU model MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7700494d9603605fba5d1e402b3c8c0234d942b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 20:30:49 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7700494d9603605fba5d1e402b3c8c0234d942b1 commit 7700494d9603605fba5d1e402b3c8c0234d942b1 Author: Warner Losh AuthorDate: 2021-06-11 20:13:31 +0000 Commit: Warner Losh CommitDate: 2021-06-11 20:28:54 +0000 mtk: Add printing of CPU model Add the line that's in other foo_machdep.c file where the CPU model is reported. This was part of github pull request 459, but in a different way. The rest of that pull request was either committed or not relevant. I did it in a more correct way. Submitted by: Priit Trees Sponsored by: Netflix --- sys/mips/mediatek/mtk_machdep.c | 1 + sys/mips/mediatek/mtk_soc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/mips/mediatek/mtk_machdep.c b/sys/mips/mediatek/mtk_machdep.c index bfffaee634bd..e4406eacf6a5 100644 --- a/sys/mips/mediatek/mtk_machdep.c +++ b/sys/mips/mediatek/mtk_machdep.c @@ -258,6 +258,7 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused, printf("FDT DTB at: 0x%08x\n", (uint32_t)dtbp); + printf("CPU model: %s\n", cpu_model); printf("CPU clock: %4dMHz\n", mtk_soc_get_cpuclk()/(1000*1000)); printf("Timer clock: %4dMHz\n", timer_clk/(1000*1000)); printf("UART clock: %4dMHz\n\n", mtk_soc_get_uartclk()/(1000*1000)); diff --git a/sys/mips/mediatek/mtk_soc.c b/sys/mips/mediatek/mtk_soc.c index 9fd307a92a67..96ce0bc0f12f 100644 --- a/sys/mips/mediatek/mtk_soc.c +++ b/sys/mips/mediatek/mtk_soc.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include From owner-dev-commits-src-main@freebsd.org Fri Jun 11 20:40:32 2021 Return-Path: Delivered-To: dev-commits-src-main@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 DD6BA664863; Fri, 11 Jun 2021 20:40:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1t5X5j4Mz4gZ0; Fri, 11 Jun 2021 20:40: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 A92492978B; Fri, 11 Jun 2021 20:40: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 15BKeWRs039113; Fri, 11 Jun 2021 20:40:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BKeWR4039112; Fri, 11 Jun 2021 20:40:32 GMT (envelope-from git) Date: Fri, 11 Jun 2021 20:40:32 GMT Message-Id: <202106112040.15BKeWR4039112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: cd7de223769a - main - Remove an manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd7de223769a5e7d3e27fe8b6d034ed9b041f8b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 20:40:32 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cd7de223769a5e7d3e27fe8b6d034ed9b041f8b0 commit cd7de223769a5e7d3e27fe8b6d034ed9b041f8b0 Author: Warner Losh AuthorDate: 2021-06-11 20:40:13 +0000 Commit: Warner Losh CommitDate: 2021-06-11 20:40:13 +0000 Remove an manpage --- share/man/man4/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 88414801888f..5051470edc71 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -47,7 +47,6 @@ MAN= aac.4 \ ${_amdtemp.4} \ ${_bxe.4} \ amr.4 \ - an.4 \ ${_aout.4} \ ${_apic.4} \ arcmsr.4 \ @@ -618,7 +617,6 @@ MLINKS+=altera_sdcard.4 altera_sdcardc.4 MLINKS+=altq.4 ALTQ.4 MLINKS+=ath.4 if_ath.4 MLINKS+=ath_pci.4 if_ath_pci.4 -MLINKS+=an.4 if_an.4 MLINKS+=aue.4 if_aue.4 MLINKS+=axe.4 if_axe.4 MLINKS+=bce.4 if_bce.4 From owner-dev-commits-src-main@freebsd.org Fri Jun 11 21:59:30 2021 Return-Path: Delivered-To: dev-commits-src-main@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 3A8E16654D0; Fri, 11 Jun 2021 21:59:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1vrf11tlz4krD; Fri, 11 Jun 2021 21:59: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 06E872A75E; Fri, 11 Jun 2021 21:59: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 15BLxTAr037383; Fri, 11 Jun 2021 21:59:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BLxTBR037382; Fri, 11 Jun 2021 21:59:29 GMT (envelope-from git) Date: Fri, 11 Jun 2021 21:59:29 GMT Message-Id: <202106112159.15BLxTBR037382@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: e290182bcf38 - main - Remove 'make update'. 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: e290182bcf3895ca659dff111bca6a077c4708b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 21:59:30 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e290182bcf3895ca659dff111bca6a077c4708b1 commit e290182bcf3895ca659dff111bca6a077c4708b1 Author: John Baldwin AuthorDate: 2021-06-11 21:56:28 +0000 Commit: John Baldwin CommitDate: 2021-06-11 21:56:28 +0000 Remove 'make update'. In the CVS days this used be a wrapper around either CVS or CVSup and used to support updating src, doc, and ports checkouts. With the move to subversion this only supported updating src and was itself a wrapper around 'svn update'. With Git, users are probably better off using appropriate Git commands directly to update without needing an explicit make target as a wrapper. Reviewed by: bcr, imp, emaste Differential Revision: https://reviews.freebsd.org/D30736 --- Makefile | 3 +-- Makefile.inc1 | 27 --------------------------- share/man/man5/make.conf.5 | 25 +------------------------ 3 files changed, 2 insertions(+), 53 deletions(-) diff --git a/Makefile b/Makefile index 3b37b7e1f669..711854f4693c 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,6 @@ # kernel-toolchain - Builds the subset of world necessary to build a kernel # kernel-toolchains - Build kernel-toolchain for all universe targets. # doxygen - Build API documentation of the kernel, needs doxygen. -# update - Convenient way to update your source tree(s). # checkworld - Run test suite on installed world. # check-old - List obsolete directories/files/libraries. # check-old-dirs - List obsolete directories. @@ -155,7 +154,7 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ installkernel.debug packagekernel packageworld \ reinstallkernel reinstallkernel.debug \ installworld kernel-toolchain libraries maninstall \ - obj objlink showconfig tags toolchain update \ + obj objlink showconfig tags toolchain \ makeman sysent \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _build-metadata _cross-tools _includes _libraries \ diff --git a/Makefile.inc1 b/Makefile.inc1 index d72e0ca56beb..b06c269b6489 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -11,9 +11,7 @@ # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel # -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel -# -DNO_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_ROOT install without using root privilege -# -DNO_DOCUPDATE do not update doc in ${MAKE} update # -DWITHOUT_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # LOCAL_ITOOLS="list of tools" to add additional tools to the ITOOLS list @@ -491,17 +489,6 @@ BUILDENV_SHELL?=/bin/sh .endif .if !defined(_MKSHOWCONFIG) -.if !defined(SVN_CMD) || empty(SVN_CMD) -. for _P in /usr/bin /usr/local/bin -. for _S in svn svnlite -. if exists(${_P}/${_S}) -SVN_CMD= ${_P}/${_S} -. endif -. endfor -. endfor -.export SVN_CMD -.endif -SVNFLAGS?= -r HEAD .if !defined(VCS_REVISION) || empty(VCS_REVISION) .if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) . for _D in ${PATH:S,:, ,g} @@ -2113,20 +2100,6 @@ doxygen: .PHONY fi ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys; ${MAKE} obj all -# -# update -# -# Update the source tree(s), by running svn/svnup to update to the -# latest copy. -# -update: .PHONY -.if defined(SVN_UPDATE) - @echo "--------------------------------------------------------------" - @echo ">>> Updating ${.CURDIR} using Subversion" - @echo "--------------------------------------------------------------" - @(cd ${.CURDIR}; ${SVN_CMD} update ${SVNFLAGS}) -.endif - # # ------------------------------------------------------------------------ # diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 3dffdf7b402c..b8bb71ddc165 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2020 +.Dd June 11, 2021 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -229,29 +229,6 @@ Setting this variable will prevent CPU specific compiler flags from being automatically added to .Va CFLAGS during compile time. -.It Va NO_DOCUPDATE -.Pq Vt bool -Set this to not update the doc tree during -.Dq Li "make update" . -.It Va NO_PORTSUPDATE -.Pq Vt bool -Set this to not update the ports tree during -.Dq Li "make update" . -.It Va SVN_UPDATE -.Pq Vt bool -Set this to use -.Xr svn 1 -or -.Xr svnlite 1 -to update your -.Pa src -tree with -.Dq Li "make update" . -Note that you can set -.Va SVN -to the full path of a -.Xr svn 1 -binary. .El .Ss "BUILDING THE KERNEL" The following list provides a name and short description for variables From owner-dev-commits-src-main@freebsd.org Fri Jun 11 21:59:40 2021 Return-Path: Delivered-To: dev-commits-src-main@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 416FB66546D; Fri, 11 Jun 2021 21:59:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1vrr1QYMz4kts; Fri, 11 Jun 2021 21:59: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 19AE52A819; Fri, 11 Jun 2021 21:59: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 15BLxeV8037414; Fri, 11 Jun 2021 21:59:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BLxVYG037406; Fri, 11 Jun 2021 21:59:31 GMT (envelope-from git) Date: Fri, 11 Jun 2021 21:59:31 GMT Message-Id: <202106112159.15BLxVYG037406@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: 0333fad1b7e0 - main - Remove svnlite. 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: 0333fad1b7e042eea0fe8348c6fde8ee55538d63 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 21:59:40 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0333fad1b7e042eea0fe8348c6fde8ee55538d63 commit 0333fad1b7e042eea0fe8348c6fde8ee55538d63 Author: John Baldwin AuthorDate: 2021-06-11 21:56:41 +0000 Commit: John Baldwin CommitDate: 2021-06-11 21:56:41 +0000 Remove svnlite. Reviewed by: bcr, imp, emaste Differential Revision: https://reviews.freebsd.org/D30737 --- Makefile.inc1 | 1 - ObsoleteFiles.inc | 25 + contrib/apr-util/CHANGES | 83 - contrib/apr-util/CMakeLists.txt | 355 - contrib/apr-util/LICENSE | 459 - contrib/apr-util/Makefile.in | 123 - contrib/apr-util/Makefile.win | 384 - contrib/apr-util/NOTICE | 14 - contrib/apr-util/NWGNUmakefile | 310 - contrib/apr-util/README | 111 - contrib/apr-util/README.FREETDS | 11 - contrib/apr-util/README.cmake | 139 - contrib/apr-util/apr-util.pc.in | 13 - contrib/apr-util/apr-util.spec | 200 - contrib/apr-util/aprutil.dsw | 443 - contrib/apr-util/apu-config.in | 221 - contrib/apr-util/buckets/apr_brigade.c | 736 - contrib/apr-util/buckets/apr_buckets.c | 46 - contrib/apr-util/buckets/apr_buckets_alloc.c | 234 - contrib/apr-util/buckets/apr_buckets_eos.c | 54 - contrib/apr-util/buckets/apr_buckets_file.c | 242 - contrib/apr-util/buckets/apr_buckets_flush.c | 54 - contrib/apr-util/buckets/apr_buckets_heap.c | 96 - contrib/apr-util/buckets/apr_buckets_mmap.c | 144 - contrib/apr-util/buckets/apr_buckets_pipe.c | 119 - contrib/apr-util/buckets/apr_buckets_pool.c | 142 - contrib/apr-util/buckets/apr_buckets_refcount.c | 64 - contrib/apr-util/buckets/apr_buckets_simple.c | 137 - contrib/apr-util/buckets/apr_buckets_socket.c | 114 - contrib/apr-util/build-outputs.mk | 152 - contrib/apr-util/build.conf | 104 - contrib/apr-util/buildconf | 118 - contrib/apr-util/config.layout | 232 - contrib/apr-util/configure | 25340 --------------- contrib/apr-util/configure.in | 344 - contrib/apr-util/crypto/apr_crypto.c | 608 - contrib/apr-util/crypto/apr_crypto_commoncrypto.c | 906 - contrib/apr-util/crypto/apr_crypto_nss.c | 1097 - contrib/apr-util/crypto/apr_crypto_openssl.c | 973 - contrib/apr-util/crypto/apr_md4.c | 404 - contrib/apr-util/crypto/apr_md5.c | 666 - contrib/apr-util/crypto/apr_passwd.c | 200 - contrib/apr-util/crypto/apr_sha1.c | 368 - contrib/apr-util/crypto/apr_siphash.c | 196 - contrib/apr-util/crypto/crypt_blowfish.c | 902 - contrib/apr-util/crypto/crypt_blowfish.h | 27 - contrib/apr-util/crypto/getuuid.c | 208 - contrib/apr-util/crypto/uuid.c | 130 - contrib/apr-util/dbd/NWGNUdbdmysql | 295 - contrib/apr-util/dbd/NWGNUdbdpgsql | 301 - contrib/apr-util/dbd/NWGNUdbdsqli2 | 296 - contrib/apr-util/dbd/NWGNUdbdsqli3 | 298 - contrib/apr-util/dbd/NWGNUmakefile | 259 - contrib/apr-util/dbd/apr_dbd.c | 573 - contrib/apr-util/dbd/apr_dbd_mysql.c | 1305 - contrib/apr-util/dbd/apr_dbd_odbc.c | 1750 - contrib/apr-util/dbd/apr_dbd_oracle.c | 2220 -- contrib/apr-util/dbd/apr_dbd_pgsql.c | 1315 - contrib/apr-util/dbd/apr_dbd_sqlite2.c | 566 - contrib/apr-util/dbd/apr_dbd_sqlite3.c | 914 - contrib/apr-util/dbd/unsupported/NWGNUdbdfreetds | 296 - contrib/apr-util/dbd/unsupported/apr_dbd_freetds.c | 809 - contrib/apr-util/dbm/NWGNUdbmdb | 299 - contrib/apr-util/dbm/NWGNUdbmgdbm | 298 - contrib/apr-util/dbm/NWGNUmakefile | 251 - contrib/apr-util/dbm/apr_dbm.c | 307 - contrib/apr-util/dbm/apr_dbm_berkeleydb.c | 404 - contrib/apr-util/dbm/apr_dbm_gdbm.c | 255 - contrib/apr-util/dbm/apr_dbm_ndbm.c | 238 - contrib/apr-util/dbm/apr_dbm_sdbm.c | 223 - contrib/apr-util/dbm/sdbm/sdbm.c | 584 - contrib/apr-util/dbm/sdbm/sdbm_hash.c | 63 - contrib/apr-util/dbm/sdbm/sdbm_lock.c | 79 - contrib/apr-util/dbm/sdbm/sdbm_pair.c | 320 - contrib/apr-util/dbm/sdbm/sdbm_pair.h | 40 - contrib/apr-util/dbm/sdbm/sdbm_private.h | 84 - contrib/apr-util/dbm/sdbm/sdbm_tune.h | 40 - contrib/apr-util/docs/doxygen.conf | 32 - contrib/apr-util/encoding/apr_base64.c | 268 - contrib/apr-util/export_vars.sh.in | 13 - contrib/apr-util/hooks/apr_hooks.c | 414 - contrib/apr-util/include/apr_anylock.h | 128 - contrib/apr-util/include/apr_base64.h | 113 - contrib/apr-util/include/apr_buckets.h | 1598 - contrib/apr-util/include/apr_crypto.h | 507 - contrib/apr-util/include/apr_date.h | 106 - contrib/apr-util/include/apr_dbd.h | 549 - contrib/apr-util/include/apr_dbm.h | 227 - contrib/apr-util/include/apr_hooks.h | 358 - contrib/apr-util/include/apr_ldap.h.in | 197 - contrib/apr-util/include/apr_ldap.hnw | 158 - contrib/apr-util/include/apr_ldap.hw | 197 - contrib/apr-util/include/apr_ldap.hwc | 197 - contrib/apr-util/include/apr_ldap_init.h | 165 - contrib/apr-util/include/apr_ldap_option.h | 254 - contrib/apr-util/include/apr_ldap_rebind.h | 98 - contrib/apr-util/include/apr_ldap_url.h | 120 - contrib/apr-util/include/apr_md4.h | 135 - contrib/apr-util/include/apr_md5.h | 176 - contrib/apr-util/include/apr_memcache.h | 444 - contrib/apr-util/include/apr_optional.h | 92 - contrib/apr-util/include/apr_optional_hooks.h | 117 - contrib/apr-util/include/apr_queue.h | 138 - contrib/apr-util/include/apr_redis.h | 459 - contrib/apr-util/include/apr_reslist.h | 183 - contrib/apr-util/include/apr_rmm.h | 137 - contrib/apr-util/include/apr_sdbm.h | 176 - contrib/apr-util/include/apr_sha1.h | 121 - contrib/apr-util/include/apr_siphash.h | 148 - contrib/apr-util/include/apr_strmatch.h | 81 - contrib/apr-util/include/apr_thread_pool.h | 299 - contrib/apr-util/include/apr_uri.h | 178 - contrib/apr-util/include/apr_uuid.h | 76 - contrib/apr-util/include/apr_xlate.h | 163 - contrib/apr-util/include/apr_xml.h | 358 - contrib/apr-util/include/apu.h.in | 128 - contrib/apr-util/include/apu.hnw | 124 - contrib/apr-util/include/apu.hw | 146 - contrib/apr-util/include/apu.hwc | 145 - contrib/apr-util/include/apu_errno.h | 173 - contrib/apr-util/include/apu_version.h | 139 - contrib/apr-util/include/apu_want.h.in | 51 - contrib/apr-util/include/apu_want.hnw | 52 - contrib/apr-util/include/apu_want.hw | 52 - .../apr-util/include/private/apr_crypto_internal.h | 297 - .../apr-util/include/private/apr_dbd_internal.h | 365 - contrib/apr-util/include/private/apr_dbd_odbc_v2.h | 119 - contrib/apr-util/include/private/apr_dbm_private.h | 121 - contrib/apr-util/include/private/apu_config.h.in | 183 - contrib/apr-util/include/private/apu_config.hnw | 53 - contrib/apr-util/include/private/apu_config.hw | 52 - contrib/apr-util/include/private/apu_internal.h | 73 - .../apr-util/include/private/apu_select_dbm.h.in | 28 - contrib/apr-util/include/private/apu_select_dbm.hw | 28 - contrib/apr-util/ldap/NWGNUmakefile | 263 - contrib/apr-util/ldap/apr_ldap_init.c | 235 - contrib/apr-util/ldap/apr_ldap_option.c | 652 - contrib/apr-util/ldap/apr_ldap_rebind.c | 377 - contrib/apr-util/ldap/apr_ldap_stub.c | 145 - contrib/apr-util/ldap/apr_ldap_url.c | 694 - contrib/apr-util/libaprutil.rc | 69 - contrib/apr-util/memcache/apr_memcache.c | 1724 - contrib/apr-util/misc/apr_date.c | 637 - contrib/apr-util/misc/apr_queue.c | 398 - contrib/apr-util/misc/apr_reslist.c | 473 - contrib/apr-util/misc/apr_rmm.c | 457 - contrib/apr-util/misc/apr_thread_pool.c | 956 - contrib/apr-util/misc/apu_dso.c | 209 - contrib/apr-util/misc/apu_version.c | 37 - contrib/apr-util/redis/apr_redis.c | 1548 - contrib/apr-util/renames_pending | 2 - contrib/apr-util/strmatch/apr_strmatch.c | 118 - contrib/apr-util/test/Makefile.in | 90 - contrib/apr-util/test/Makefile.win | 171 - contrib/apr-util/test/NWGNUaputest | 282 - contrib/apr-util/test/NWGNUmakefile | 258 - contrib/apr-util/test/abts.c | 423 - contrib/apr-util/test/abts.h | 101 - contrib/apr-util/test/abts_tests.h | 48 - contrib/apr-util/test/data/billion-laughs.xml | 36 - contrib/apr-util/test/dbd.c | 407 - contrib/apr-util/test/nw_misc.c | 23 - contrib/apr-util/test/test_apu.h | 100 - contrib/apr-util/test/testall.dsw | 513 - contrib/apr-util/test/testbuckets.c | 535 - contrib/apr-util/test/testcrypto.c | 1545 - contrib/apr-util/test/testdate.c | 202 - contrib/apr-util/test/testdbd.c | 245 - contrib/apr-util/test/testdbm.c | 221 - contrib/apr-util/test/testldap.c | 250 - contrib/apr-util/test/testmd4.c | 119 - contrib/apr-util/test/testmd5.c | 103 - contrib/apr-util/test/testmemcache.c | 626 - contrib/apr-util/test/testpass.c | 217 - contrib/apr-util/test/testqueue.c | 135 - contrib/apr-util/test/testredis.c | 552 - contrib/apr-util/test/testreslist.c | 272 - contrib/apr-util/test/testrmm.c | 191 - contrib/apr-util/test/testsiphash.c | 148 - contrib/apr-util/test/teststrmatch.c | 92 - contrib/apr-util/test/testuri.c | 331 - contrib/apr-util/test/testutil.c | 60 - contrib/apr-util/test/testutil.h | 73 - contrib/apr-util/test/testuuid.c | 56 - contrib/apr-util/test/testxlate.c | 134 - contrib/apr-util/test/testxml.c | 205 - contrib/apr-util/uri/apr_uri.c | 962 - contrib/apr-util/xlate/xlate.c | 458 - contrib/apr-util/xml/NWGNUmakefile | 259 - contrib/apr-util/xml/apr_xml.c | 1078 - contrib/apr/CHANGES | 82 - contrib/apr/CMakeLists.txt | 431 - contrib/apr/LICENSE | 341 - contrib/apr/Makefile.in | 150 - contrib/apr/Makefile.win | 171 - contrib/apr/NOTICE | 15 - contrib/apr/NWGNUmakefile | 434 - contrib/apr/README | 167 - contrib/apr/README.cmake | 112 - contrib/apr/apr-config.in | 251 - contrib/apr/apr.dep | 1916 -- contrib/apr/apr.dsp | 831 - contrib/apr/apr.dsw | 101 - contrib/apr/apr.mak | 1380 - contrib/apr/apr.pc.in | 11 - contrib/apr/apr.spec | 100 - contrib/apr/atomic/unix/builtins.c | 81 - contrib/apr/atomic/unix/builtins64.c | 64 - contrib/apr/atomic/unix/ia32.c | 131 - contrib/apr/atomic/unix/mutex.c | 206 - contrib/apr/atomic/unix/mutex64.c | 178 - contrib/apr/atomic/unix/ppc.c | 211 - contrib/apr/atomic/unix/s390.c | 159 - contrib/apr/atomic/unix/solaris.c | 83 - contrib/apr/build-outputs.mk | 328 - contrib/apr/build.conf | 29 - contrib/apr/buildconf | 136 - contrib/apr/config.layout | 232 - contrib/apr/configure | 32465 ------------------- contrib/apr/configure.in | 3020 -- contrib/apr/docs/APRDesign.html | 399 - contrib/apr/docs/canonical_filenames.html | 156 - contrib/apr/docs/doxygen.conf | 38 - contrib/apr/docs/incomplete_types | 84 - contrib/apr/docs/non_apr_programs | 47 - contrib/apr/docs/pool-design.html | 96 - contrib/apr/docs/win32_builds.html | 57 - contrib/apr/dso/unix/dso.c | 251 - contrib/apr/emacs-mode | 15 - contrib/apr/encoding/apr_encode.c | 1419 - contrib/apr/encoding/apr_escape.c | 1214 - contrib/apr/file_io/unix/buffer.c | 60 - contrib/apr/file_io/unix/copy.c | 119 - contrib/apr/file_io/unix/dir.c | 373 - contrib/apr/file_io/unix/fileacc.c | 119 - contrib/apr/file_io/unix/filedup.c | 181 - contrib/apr/file_io/unix/filepath.c | 314 - contrib/apr/file_io/unix/filepath_util.c | 111 - contrib/apr/file_io/unix/filestat.c | 339 - contrib/apr/file_io/unix/flock.c | 120 - contrib/apr/file_io/unix/fullrw.c | 111 - contrib/apr/file_io/unix/mktemp.c | 223 - contrib/apr/file_io/unix/open.c | 417 - contrib/apr/file_io/unix/pipe.c | 292 - contrib/apr/file_io/unix/readwrite.c | 528 - contrib/apr/file_io/unix/seek.c | 136 - contrib/apr/file_io/unix/tempdir.c | 129 - contrib/apr/helpers/apr_rename.pl | 106 - contrib/apr/include/apr.h.in | 656 - contrib/apr/include/apr.hnw | 445 - contrib/apr/include/apr.hw | 667 - contrib/apr/include/apr.hwc | 664 - contrib/apr/include/apr_allocator.h | 179 - contrib/apr/include/apr_atomic.h | 207 - contrib/apr/include/apr_cstr.h | 292 - contrib/apr/include/apr_dso.h | 94 - contrib/apr/include/apr_encode.h | 569 - contrib/apr/include/apr_env.h | 67 - contrib/apr/include/apr_errno.h | 1342 - contrib/apr/include/apr_escape.h | 431 - contrib/apr/include/apr_file_info.h | 428 - contrib/apr/include/apr_file_io.h | 1005 - contrib/apr/include/apr_fnmatch.h | 153 - contrib/apr/include/apr_general.h | 244 - contrib/apr/include/apr_getopt.h | 160 - contrib/apr/include/apr_global_mutex.h | 195 - contrib/apr/include/apr_hash.h | 283 - contrib/apr/include/apr_inherit.h | 51 - contrib/apr/include/apr_lib.h | 241 - contrib/apr/include/apr_mmap.h | 171 - contrib/apr/include/apr_network_io.h | 951 - contrib/apr/include/apr_perms_set.h | 65 - contrib/apr/include/apr_poll.h | 446 - contrib/apr/include/apr_pools.h | 815 - contrib/apr/include/apr_portable.h | 549 - contrib/apr/include/apr_proc_mutex.h | 192 - contrib/apr/include/apr_random.h | 153 - contrib/apr/include/apr_ring.h | 513 - contrib/apr/include/apr_shm.h | 229 - contrib/apr/include/apr_signal.h | 109 - contrib/apr/include/apr_skiplist.h | 381 - contrib/apr/include/apr_strings.h | 380 - contrib/apr/include/apr_support.h | 57 - contrib/apr/include/apr_tables.h | 507 - contrib/apr/include/apr_thread_cond.h | 139 - contrib/apr/include/apr_thread_mutex.h | 123 - contrib/apr/include/apr_thread_proc.h | 846 - contrib/apr/include/apr_thread_rwlock.h | 129 - contrib/apr/include/apr_time.h | 237 - contrib/apr/include/apr_user.h | 158 - contrib/apr/include/apr_version.h | 164 - contrib/apr/include/apr_want.h | 124 - contrib/apr/include/arch/apr_private_common.h | 41 - contrib/apr/include/arch/unix/apr_arch_atomic.h | 53 - contrib/apr/include/arch/unix/apr_arch_dso.h | 63 - contrib/apr/include/arch/unix/apr_arch_file_io.h | 174 - .../apr/include/arch/unix/apr_arch_global_mutex.h | 37 - contrib/apr/include/arch/unix/apr_arch_inherit.h | 64 - .../apr/include/arch/unix/apr_arch_internal_time.h | 24 - contrib/apr/include/arch/unix/apr_arch_misc.h | 67 - contrib/apr/include/arch/unix/apr_arch_networkio.h | 145 - .../apr/include/arch/unix/apr_arch_poll_private.h | 189 - .../apr/include/arch/unix/apr_arch_proc_mutex.h | 121 - contrib/apr/include/arch/unix/apr_arch_shm.h | 74 - .../apr/include/arch/unix/apr_arch_thread_cond.h | 42 - .../apr/include/arch/unix/apr_arch_thread_mutex.h | 42 - .../apr/include/arch/unix/apr_arch_thread_rwlock.h | 49 - .../apr/include/arch/unix/apr_arch_threadproc.h | 119 - contrib/apr/include/arch/unix/apr_private.h.in | 1075 - contrib/apr/include/private/apr_encode_private.h | 84 - contrib/apr/libapr.dep | 1920 -- contrib/apr/libapr.dsp | 868 - contrib/apr/libapr.mak | 1609 - contrib/apr/libapr.rc | 64 - contrib/apr/locks/unix/global_mutex.c | 245 - contrib/apr/locks/unix/proc_mutex.c | 1695 - contrib/apr/locks/unix/thread_cond.c | 145 - contrib/apr/locks/unix/thread_mutex.c | 334 - contrib/apr/locks/unix/thread_rwlock.c | 181 - contrib/apr/memory/unix/apr_pools.c | 2932 -- contrib/apr/misc/unix/charset.c | 83 - contrib/apr/misc/unix/env.c | 88 - contrib/apr/misc/unix/errorcodes.c | 443 - contrib/apr/misc/unix/getopt.c | 309 - contrib/apr/misc/unix/otherchild.c | 221 - contrib/apr/misc/unix/rand.c | 302 - contrib/apr/misc/unix/randbyte_os2.inc | 123 - contrib/apr/misc/unix/start.c | 89 - contrib/apr/misc/unix/version.c | 35 - contrib/apr/mmap/unix/common.c | 43 - contrib/apr/mmap/unix/mmap.c | 172 - contrib/apr/network_io/unix/inet_ntop.c | 243 - contrib/apr/network_io/unix/inet_pton.c | 240 - contrib/apr/network_io/unix/multicast.c | 313 - contrib/apr/network_io/unix/sendrecv.c | 1110 - contrib/apr/network_io/unix/sockaddr.c | 1284 - contrib/apr/network_io/unix/socket_util.c | 75 - contrib/apr/network_io/unix/sockets.c | 572 - contrib/apr/network_io/unix/sockopt.c | 465 - contrib/apr/passwd/apr_getpass.c | 256 - contrib/apr/poll/unix/epoll.c | 490 - contrib/apr/poll/unix/kqueue.c | 505 - contrib/apr/poll/unix/poll.c | 460 - contrib/apr/poll/unix/pollcb.c | 224 - contrib/apr/poll/unix/pollset.c | 247 - contrib/apr/poll/unix/port.c | 594 - contrib/apr/poll/unix/select.c | 449 - contrib/apr/poll/unix/wakeup.c | 151 - contrib/apr/poll/unix/z_asio.c | 782 - contrib/apr/random/unix/apr_random.c | 88 - contrib/apr/random/unix/sha2.c | 528 - contrib/apr/random/unix/sha2.h | 59 - contrib/apr/random/unix/sha2_glue.c | 49 - contrib/apr/shmem/unix/shm.c | 731 - contrib/apr/strings/apr_cpystrn.c | 315 - contrib/apr/strings/apr_cstr.c | 403 - contrib/apr/strings/apr_fnmatch.c | 482 - contrib/apr/strings/apr_snprintf.c | 1407 - contrib/apr/strings/apr_strings.c | 467 - contrib/apr/strings/apr_strnatcmp.c | 149 - contrib/apr/strings/apr_strtok.c | 56 - contrib/apr/support/unix/waitio.c | 123 - contrib/apr/tables/apr_hash.c | 552 - contrib/apr/tables/apr_skiplist.c | 852 - contrib/apr/tables/apr_tables.c | 1300 - contrib/apr/threadproc/unix/proc.c | 739 - contrib/apr/threadproc/unix/procsup.c | 104 - contrib/apr/threadproc/unix/signals.c | 481 - contrib/apr/threadproc/unix/thread.c | 334 - contrib/apr/threadproc/unix/threadpriv.c | 129 - contrib/apr/time/unix/time.c | 349 - contrib/apr/time/unix/timestr.c | 153 - contrib/apr/tools/gen_test_char.c | 131 - contrib/apr/user/unix/groupinfo.c | 87 - contrib/apr/user/unix/userinfo.c | 146 - contrib/serf/CHANGES | 310 - contrib/serf/LICENSE | 201 - contrib/serf/NOTICE | 7 - contrib/serf/README | 92 - contrib/serf/SConstruct | 505 - contrib/serf/STATUS | 19 - contrib/serf/auth/auth.c | 490 - contrib/serf/auth/auth.h | 130 - contrib/serf/auth/auth_basic.c | 182 - contrib/serf/auth/auth_digest.c | 562 - contrib/serf/auth/auth_spnego.c | 662 - contrib/serf/auth/auth_spnego.h | 121 - contrib/serf/auth/auth_spnego_gss.c | 231 - contrib/serf/auth/auth_spnego_sspi.c | 303 - contrib/serf/buckets/aggregate_buckets.c | 493 - contrib/serf/buckets/allocator.c | 439 - contrib/serf/buckets/barrier_buckets.c | 102 - contrib/serf/buckets/buckets.c | 645 - contrib/serf/buckets/bwtp_buckets.c | 601 - contrib/serf/buckets/chunk_buckets.c | 240 - contrib/serf/buckets/dechunk_buckets.c | 204 - contrib/serf/buckets/deflate_buckets.c | 408 - contrib/serf/buckets/file_buckets.c | 122 - contrib/serf/buckets/headers_buckets.c | 461 - contrib/serf/buckets/iovec_buckets.c | 174 - contrib/serf/buckets/limit_buckets.c | 132 - contrib/serf/buckets/mmap_buckets.c | 145 - contrib/serf/buckets/request_buckets.c | 242 - contrib/serf/buckets/response_body_buckets.c | 140 - contrib/serf/buckets/response_buckets.c | 503 - contrib/serf/buckets/simple_buckets.c | 164 - contrib/serf/buckets/socket_buckets.c | 130 - contrib/serf/buckets/ssl_buckets.c | 1988 -- contrib/serf/build/check.py | 67 - contrib/serf/build/gen_def.py | 78 - contrib/serf/build/serf.pc.in | 13 - contrib/serf/context.c | 390 - contrib/serf/design-guide.txt | 152 - contrib/serf/incoming.c | 181 - contrib/serf/outgoing.c | 1754 - contrib/serf/serf.h | 1122 - contrib/serf/serf_bucket_types.h | 693 - contrib/serf/serf_bucket_util.h | 299 - contrib/serf/serf_private.h | 470 - contrib/serf/ssltunnel.c | 200 - contrib/subversion/.editorconfig | 20 - contrib/subversion/.ycm_extra_conf.py | 88 - contrib/subversion/BUGS | 2 - contrib/subversion/CHANGES | 7314 ----- contrib/subversion/COMMITTERS | 246 - contrib/subversion/INSTALL | 1470 - contrib/subversion/LICENSE | 446 - contrib/subversion/Makefile.in | 1044 - contrib/subversion/NOTICE | 34 - contrib/subversion/README | 84 - contrib/subversion/aclocal.m4 | 61 - contrib/subversion/autogen.sh | 247 - contrib/subversion/build-outputs.mk | 3630 --- contrib/subversion/build.conf | 1767 - contrib/subversion/configure | 30335 ----------------- contrib/subversion/configure.ac | 1686 - contrib/subversion/doc/README | 28 - contrib/subversion/doc/doxygen.conf | 1488 - .../doc/programmer/WritingChangeLogs.txt | 220 - .../subversion/doc/user/cvs-crossover-guide.html | 906 - contrib/subversion/doc/user/lj_article.txt | 323 - .../subversion/doc/user/svn-best-practices.html | 318 - contrib/subversion/gen-make.opts | 2 - contrib/subversion/gen-make.py | 329 - contrib/subversion/get-deps.sh | 176 - .../subversion/subversion/include/mod_authz_svn.h | 61 - .../subversion/subversion/include/mod_dav_svn.h | 132 - .../subversion/subversion/include/private/README | 4 - .../subversion/include/private/ra_svn_sasl.h | 80 - .../include/private/ra_svn_wrapped_sasl.h | 131 - .../subversion/include/private/svn_adler32.h | 52 - .../subversion/include/private/svn_atomic.h | 158 - .../subversion/include/private/svn_auth_private.h | 267 - .../subversion/include/private/svn_branch.h | 679 - .../subversion/include/private/svn_branch_compat.h | 273 - .../subversion/include/private/svn_branch_impl.h | 197 - .../subversion/include/private/svn_branch_nested.h | 216 - .../subversion/include/private/svn_branch_repos.h | 104 - .../subversion/include/private/svn_cache.h | 580 - .../subversion/include/private/svn_cert.h | 68 - .../subversion/include/private/svn_client_mtcc.h | 237 - .../include/private/svn_client_private.h | 542 - .../subversion/include/private/svn_client_shelf.h | 498 - .../subversion/include/private/svn_client_shelf2.h | 467 - .../include/private/svn_cmdline_private.h | 285 - .../include/private/svn_config_private.h | 129 - .../subversion/include/private/svn_dav_protocol.h | 68 - .../subversion/include/private/svn_debug.h | 107 - .../subversion/include/private/svn_delta_private.h | 134 - .../subversion/include/private/svn_dep_compat.h | 211 - .../subversion/include/private/svn_diff_private.h | 155 - .../subversion/include/private/svn_diff_tree.h | 373 - .../include/private/svn_dirent_uri_private.h | 53 - .../subversion/include/private/svn_doxygen.h | 32 - .../subversion/include/private/svn_editor.h | 1135 - .../subversion/include/private/svn_element.h | 399 - .../subversion/include/private/svn_eol_private.h | 93 - .../subversion/include/private/svn_error_private.h | 54 - .../subversion/include/private/svn_fs_fs_private.h | 371 - .../subversion/include/private/svn_fs_private.h | 222 - .../subversion/include/private/svn_fs_util.h | 251 - .../subversion/include/private/svn_fspath.h | 175 - .../subversion/include/private/svn_io_private.h | 182 - .../subversion/include/private/svn_log.h | 271 - .../subversion/include/private/svn_magic.h | 57 - .../include/private/svn_mergeinfo_private.h | 294 - .../subversion/include/private/svn_mutex.h | 122 - .../subversion/include/private/svn_object_pool.h | 119 - .../subversion/include/private/svn_opt_private.h | 152 - .../subversion/include/private/svn_packed_data.h | 260 - .../subversion/include/private/svn_ra_private.h | 315 - .../include/private/svn_ra_svn_private.h | 1060 - .../subversion/include/private/svn_repos_private.h | 397 - .../subversion/include/private/svn_skel.h | 236 - .../subversion/include/private/svn_sorts_private.h | 230 - .../subversion/include/private/svn_sqlite.h | 571 - .../include/private/svn_string_private.h | 336 - .../subversion/include/private/svn_subr_private.h | 753 - .../include/private/svn_temp_serializer.h | 223 - .../subversion/include/private/svn_token.h | 98 - .../subversion/include/private/svn_utf_private.h | 295 - .../subversion/include/private/svn_wc_private.h | 2135 -- contrib/subversion/subversion/include/svn_auth.h | 1327 - contrib/subversion/subversion/include/svn_base64.h | 138 - .../subversion/include/svn_cache_config.h | 95 - .../subversion/subversion/include/svn_checksum.h | 301 - contrib/subversion/subversion/include/svn_client.h | 7835 ----- .../subversion/subversion/include/svn_cmdline.h | 420 - contrib/subversion/subversion/include/svn_compat.h | 116 - contrib/subversion/subversion/include/svn_config.h | 915 - contrib/subversion/subversion/include/svn_ctype.h | 196 - contrib/subversion/subversion/include/svn_dav.h | 433 - contrib/subversion/subversion/include/svn_delta.h | 1578 - contrib/subversion/subversion/include/svn_diff.h | 1377 - .../subversion/subversion/include/svn_dirent_uri.h | 927 - contrib/subversion/subversion/include/svn_dso.h | 99 - contrib/subversion/subversion/include/svn_error.h | 703 - .../subversion/include/svn_error_codes.h | 1805 -- contrib/subversion/subversion/include/svn_fs.h | 3560 -- contrib/subversion/subversion/include/svn_hash.h | 289 - contrib/subversion/subversion/include/svn_io.h | 2644 -- contrib/subversion/subversion/include/svn_iter.h | 139 - contrib/subversion/subversion/include/svn_md5.h | 91 - .../subversion/subversion/include/svn_mergeinfo.h | 641 - contrib/subversion/subversion/include/svn_nls.h | 56 - contrib/subversion/subversion/include/svn_opt.h | 877 - .../subversion/subversion/include/svn_opt_impl.h | 86 - contrib/subversion/subversion/include/svn_path.h | 736 - contrib/subversion/subversion/include/svn_pools.h | 114 - contrib/subversion/subversion/include/svn_props.h | 748 - .../subversion/subversion/include/svn_quoprint.h | 77 - contrib/subversion/subversion/include/svn_ra.h | 2657 -- contrib/subversion/subversion/include/svn_ra_svn.h | 737 - contrib/subversion/subversion/include/svn_repos.h | 4403 --- contrib/subversion/subversion/include/svn_sorts.h | 147 - contrib/subversion/subversion/include/svn_string.h | 693 - contrib/subversion/subversion/include/svn_subst.h | 708 - contrib/subversion/subversion/include/svn_time.h | 101 - contrib/subversion/subversion/include/svn_types.h | 1284 - .../subversion/subversion/include/svn_types_impl.h | 157 - contrib/subversion/subversion/include/svn_user.h | 59 - contrib/subversion/subversion/include/svn_utf.h | 252 - .../subversion/subversion/include/svn_version.h | 452 - contrib/subversion/subversion/include/svn_wc.h | 8470 ----- contrib/subversion/subversion/include/svn_x509.h | 201 - contrib/subversion/subversion/include/svn_xml.h | 389 - .../libsvn_auth_gnome_keyring/gnome_keyring.c | 551 - .../libsvn_auth_gnome_keyring.pc.in | 12 - .../subversion/libsvn_auth_gnome_keyring/version.c | 35 - .../subversion/libsvn_auth_kwallet/kwallet.cpp | 471 - .../libsvn_auth_kwallet/libsvn_auth_kwallet.pc.in | 12 - .../subversion/libsvn_auth_kwallet/version.c | 35 - contrib/subversion/subversion/libsvn_client/add.c | 1282 - .../subversion/subversion/libsvn_client/blame.c | 984 - contrib/subversion/subversion/libsvn_client/cat.c | 337 - .../subversion/libsvn_client/changelist.c | 144 - .../subversion/subversion/libsvn_client/checkout.c | 229 - .../subversion/subversion/libsvn_client/cleanup.c | 265 - .../subversion/subversion/libsvn_client/client.h | 1243 - .../subversion/subversion/libsvn_client/cmdline.c | 372 - .../subversion/subversion/libsvn_client/commit.c | 1088 - .../subversion/libsvn_client/commit_util.c | 2088 -- .../subversion/libsvn_client/compat_providers.c | 140 - .../subversion/libsvn_client/conflicts.c | 13527 -------- contrib/subversion/subversion/libsvn_client/copy.c | 3488 -- contrib/subversion/subversion/libsvn_client/ctx.c | 135 - .../subversion/subversion/libsvn_client/delete.c | 604 - .../subversion/libsvn_client/deprecated.c | 3263 -- contrib/subversion/subversion/libsvn_client/diff.c | 2948 -- .../subversion/libsvn_client/diff_local.c | 741 - .../subversion/libsvn_client/diff_summarize.c | 301 - .../subversion/subversion/libsvn_client/export.c | 1591 - .../subversion/libsvn_client/externals.c | 1281 - .../subversion/subversion/libsvn_client/import.c | 1041 - contrib/subversion/subversion/libsvn_client/info.c | 490 - .../subversion/subversion/libsvn_client/iprops.c | 272 - .../subversion/subversion/libsvn_client/layout.c | 289 - .../subversion/libsvn_client/libsvn_client.pc.in | 12 - contrib/subversion/subversion/libsvn_client/list.c | 585 - .../subversion/libsvn_client/locking_commands.c | 649 - contrib/subversion/subversion/libsvn_client/log.c | 950 - .../subversion/subversion/libsvn_client/merge.c | 12946 -------- .../subversion/libsvn_client/merge_elements.c | 248 - .../subversion/libsvn_client/mergeinfo.c | 2325 -- .../subversion/libsvn_client/mergeinfo.h | 412 - contrib/subversion/subversion/libsvn_client/mtcc.c | 1487 - .../subversion/subversion/libsvn_client/patch.c | 3784 --- .../subversion/libsvn_client/prop_commands.c | 1573 - contrib/subversion/subversion/libsvn_client/ra.c | 1200 - .../subversion/subversion/libsvn_client/relocate.c | 248 - .../subversion/libsvn_client/repos_diff.c | 1406 - .../subversion/subversion/libsvn_client/resolved.c | 147 - .../subversion/subversion/libsvn_client/revert.c | 209 - .../subversion/libsvn_client/revisions.c | 197 - .../subversion/subversion/libsvn_client/shelf.c | 1274 - .../subversion/subversion/libsvn_client/shelf2.c | 2124 -- .../subversion/subversion/libsvn_client/status.c | 856 - .../subversion/subversion/libsvn_client/switch.c | 485 - .../subversion/subversion/libsvn_client/update.c | 831 - .../subversion/subversion/libsvn_client/upgrade.c | 415 - contrib/subversion/subversion/libsvn_client/url.c | 63 - contrib/subversion/subversion/libsvn_client/util.c | 471 - .../subversion/subversion/libsvn_client/version.c | 33 - .../subversion/libsvn_client/wc_editor.c | 655 - .../subversion/subversion/libsvn_delta/branch.c | 1699 - .../subversion/libsvn_delta/branch_compat.c | 2072 -- .../subversion/libsvn_delta/branch_migrate.c | 366 - .../subversion/libsvn_delta/branch_nested.c | 660 - .../subversion/libsvn_delta/branch_repos.c | 132 - .../subversion/subversion/libsvn_delta/cancel.c | 399 - .../subversion/subversion/libsvn_delta/compat.c | 2037 -- .../subversion/libsvn_delta/compose_delta.c | 839 - .../subversion/libsvn_delta/debug_editor.c | 501 - .../subversion/libsvn_delta/default_editor.c | 189 - contrib/subversion/subversion/libsvn_delta/delta.h | 96 - .../subversion/libsvn_delta/deprecated.c | 121 - .../subversion/libsvn_delta/depth_filter_editor.c | 485 - .../subversion/subversion/libsvn_delta/editor.c | 895 - .../subversion/subversion/libsvn_delta/element.c | 469 - .../subversion/libsvn_delta/libsvn_delta.pc.in | 12 - .../subversion/libsvn_delta/path_driver.c | 358 - .../subversion/subversion/libsvn_delta/svndiff.c | 1101 - .../subversion/libsvn_delta/text_delta.c | 994 - .../subversion/subversion/libsvn_delta/version.c | 33 - .../subversion/subversion/libsvn_delta/xdelta.c | 496 - .../subversion/libsvn_diff/binary_diff.c | 281 - .../subversion/subversion/libsvn_diff/deprecated.c | 464 - contrib/subversion/subversion/libsvn_diff/diff.c | 199 - contrib/subversion/subversion/libsvn_diff/diff.h | 227 - contrib/subversion/subversion/libsvn_diff/diff3.c | 532 - contrib/subversion/subversion/libsvn_diff/diff4.c | 314 - .../subversion/subversion/libsvn_diff/diff_file.c | 2492 -- .../subversion/libsvn_diff/diff_memory.c | 1129 - .../subversion/subversion/libsvn_diff/diff_tree.c | 1658 - contrib/subversion/subversion/libsvn_diff/lcs.c | 375 - .../subversion/libsvn_diff/libsvn_diff.pc.in | 12 - .../subversion/subversion/libsvn_diff/parse-diff.c | 2379 -- contrib/subversion/subversion/libsvn_diff/token.c | 198 - contrib/subversion/subversion/libsvn_diff/util.c | 623 - contrib/subversion/subversion/libsvn_fs/access.c | 98 - .../subversion/subversion/libsvn_fs/deprecated.c | 247 - contrib/subversion/subversion/libsvn_fs/editor.c | 838 - .../subversion/subversion/libsvn_fs/fs-loader.c | 2262 -- .../subversion/subversion/libsvn_fs/fs-loader.h | 602 - .../subversion/libsvn_fs/libsvn_fs.pc.in | 12 - .../subversion/libsvn_fs_base/bdb/bdb-err.c | 106 - .../subversion/libsvn_fs_base/bdb/bdb-err.h | 115 - .../subversion/libsvn_fs_base/bdb/bdb_compat.c | 34 - .../subversion/libsvn_fs_base/bdb/bdb_compat.h | 135 - .../subversion/libsvn_fs_base/bdb/changes-table.c | 482 - .../subversion/libsvn_fs_base/bdb/changes-table.h | 94 - .../libsvn_fs_base/bdb/checksum-reps-table.c | 208 - .../libsvn_fs_base/bdb/checksum-reps-table.h | 89 - .../subversion/libsvn_fs_base/bdb/copies-table.c | 210 - .../subversion/libsvn_fs_base/bdb/copies-table.h | 93 - .../subversion/subversion/libsvn_fs_base/bdb/dbt.c | 170 - .../subversion/subversion/libsvn_fs_base/bdb/dbt.h | 120 - .../subversion/subversion/libsvn_fs_base/bdb/env.c | 719 - .../subversion/subversion/libsvn_fs_base/bdb/env.h | 159 - .../libsvn_fs_base/bdb/lock-tokens-table.c | 157 - .../libsvn_fs_base/bdb/lock-tokens-table.h | 96 - .../subversion/libsvn_fs_base/bdb/locks-table.c | 328 - .../subversion/libsvn_fs_base/bdb/locks-table.h | 110 - .../libsvn_fs_base/bdb/miscellaneous-table.c | 135 - .../libsvn_fs_base/bdb/miscellaneous-table.h | 71 - .../libsvn_fs_base/bdb/node-origins-table.c | 145 - .../libsvn_fs_base/bdb/node-origins-table.h | 76 - .../subversion/libsvn_fs_base/bdb/nodes-table.c | 259 - .../subversion/libsvn_fs_base/bdb/nodes-table.h | 121 - .../subversion/libsvn_fs_base/bdb/reps-table.c | 204 - .../subversion/libsvn_fs_base/bdb/reps-table.h | 94 - .../subversion/libsvn_fs_base/bdb/rev-table.c | 224 - .../subversion/libsvn_fs_base/bdb/rev-table.h | 85 - .../subversion/libsvn_fs_base/bdb/strings-table.c | 541 - .../subversion/libsvn_fs_base/bdb/strings-table.h | 143 - .../subversion/libsvn_fs_base/bdb/txn-table.c | 325 - .../subversion/libsvn_fs_base/bdb/txn-table.h | 100 - .../subversion/libsvn_fs_base/bdb/uuids-table.c | 149 - .../subversion/libsvn_fs_base/bdb/uuids-table.h | 69 - contrib/subversion/subversion/libsvn_fs_base/dag.c | 1771 - contrib/subversion/subversion/libsvn_fs_base/dag.h | 587 - contrib/subversion/subversion/libsvn_fs_base/err.c | 177 - contrib/subversion/subversion/libsvn_fs_base/err.h | 98 - contrib/subversion/subversion/libsvn_fs_base/fs.c | 1547 - contrib/subversion/subversion/libsvn_fs_base/fs.h | 361 - .../subversion/subversion/libsvn_fs_base/fs_init.h | 33 - contrib/subversion/subversion/libsvn_fs_base/id.c | 209 - contrib/subversion/subversion/libsvn_fs_base/id.h | 81 - .../subversion/subversion/libsvn_fs_base/key-gen.c | 119 - .../subversion/subversion/libsvn_fs_base/key-gen.h | 93 - .../subversion/libsvn_fs_base/libsvn_fs_base.pc.in | 12 - .../subversion/subversion/libsvn_fs_base/lock.c | 670 - .../subversion/subversion/libsvn_fs_base/lock.h | 127 - .../subversion/libsvn_fs_base/node-rev.c | 126 - .../subversion/libsvn_fs_base/node-rev.h | 101 - .../subversion/libsvn_fs_base/notes/TODO | 137 - .../subversion/libsvn_fs_base/notes/fs-history | 270 - .../subversion/libsvn_fs_base/notes/structure | 1086 - .../subversion/libsvn_fs_base/reps-strings.c | 1618 - .../subversion/libsvn_fs_base/reps-strings.h | 176 - .../subversion/libsvn_fs_base/revs-txns.c | 1102 - .../subversion/libsvn_fs_base/revs-txns.h | 235 - .../subversion/subversion/libsvn_fs_base/trail.c | 292 - .../subversion/subversion/libsvn_fs_base/trail.h | 239 - .../subversion/subversion/libsvn_fs_base/tree.c | 5605 ---- .../subversion/subversion/libsvn_fs_base/tree.h | 99 - .../subversion/libsvn_fs_base/util/fs_skels.c | 1515 - .../subversion/libsvn_fs_base/util/fs_skels.h | 177 - .../subversion/subversion/libsvn_fs_base/uuid.c | 116 - .../subversion/subversion/libsvn_fs_base/uuid.h | 49 - .../subversion/libsvn_fs_fs/cached_data.c | 3806 --- .../subversion/libsvn_fs_fs/cached_data.h | 191 - .../subversion/subversion/libsvn_fs_fs/caching.c | 899 - contrib/subversion/subversion/libsvn_fs_fs/dag.c | 1428 - contrib/subversion/subversion/libsvn_fs_fs/dag.h | 589 - .../subversion/libsvn_fs_fs/dump-index.c | 90 - contrib/subversion/subversion/libsvn_fs_fs/fs.c | 710 - contrib/subversion/subversion/libsvn_fs_fs/fs.h | 705 - contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c | 2515 -- contrib/subversion/subversion/libsvn_fs_fs/fs_fs.h | 378 - .../subversion/subversion/libsvn_fs_fs/fs_init.h | 32 - .../subversion/subversion/libsvn_fs_fs/hotcopy.c | 1100 - .../subversion/subversion/libsvn_fs_fs/hotcopy.h | 47 - contrib/subversion/subversion/libsvn_fs_fs/id.c | 646 - contrib/subversion/subversion/libsvn_fs_fs/id.h | 163 - contrib/subversion/subversion/libsvn_fs_fs/index.c | 3471 -- contrib/subversion/subversion/libsvn_fs_fs/index.h | 356 - .../subversion/libsvn_fs_fs/libsvn_fs_fs.pc.in | 12 - .../subversion/libsvn_fs_fs/load-index.c | 174 - contrib/subversion/subversion/libsvn_fs_fs/lock.c | 1367 - contrib/subversion/subversion/libsvn_fs_fs/lock.h | 110 - .../subversion/subversion/libsvn_fs_fs/low_level.c | 1330 - .../subversion/subversion/libsvn_fs_fs/low_level.h | 235 - contrib/subversion/subversion/libsvn_fs_fs/pack.c | 2168 -- contrib/subversion/subversion/libsvn_fs_fs/pack.h | 70 - .../subversion/subversion/libsvn_fs_fs/recovery.c | 513 - .../subversion/subversion/libsvn_fs_fs/recovery.h | 36 - .../subversion/libsvn_fs_fs/rep-cache-db.h | 106 - .../subversion/libsvn_fs_fs/rep-cache-db.sql | 95 - .../subversion/subversion/libsvn_fs_fs/rep-cache.c | 423 - .../subversion/subversion/libsvn_fs_fs/rep-cache.h | 107 - .../subversion/subversion/libsvn_fs_fs/rev_file.c | 307 - .../subversion/subversion/libsvn_fs_fs/rev_file.h | 145 - .../subversion/subversion/libsvn_fs_fs/revprops.c | 1579 - .../subversion/subversion/libsvn_fs_fs/revprops.h | 180 - contrib/subversion/subversion/libsvn_fs_fs/stats.c | 1492 - .../subversion/subversion/libsvn_fs_fs/structure | 771 - .../subversion/libsvn_fs_fs/structure-indexes | 354 - .../subversion/libsvn_fs_fs/temp_serializer.c | 1429 - .../subversion/libsvn_fs_fs/temp_serializer.h | 427 - .../subversion/libsvn_fs_fs/transaction.c | 4235 --- .../subversion/libsvn_fs_fs/transaction.h | 294 - contrib/subversion/subversion/libsvn_fs_fs/tree.c | 4882 --- contrib/subversion/subversion/libsvn_fs_fs/tree.h | 111 - contrib/subversion/subversion/libsvn_fs_fs/util.c | 681 - contrib/subversion/subversion/libsvn_fs_fs/util.h | 403 - .../subversion/subversion/libsvn_fs_fs/verify.c | 923 - .../subversion/subversion/libsvn_fs_fs/verify.h | 42 - .../subversion/subversion/libsvn_fs_util/fs-util.c | 349 - .../subversion/libsvn_fs_util/libsvn_fs_util.pc.in | 12 - contrib/subversion/subversion/libsvn_fs_x/TODO | 270 - .../subversion/libsvn_fs_x/batch_fsync.c | 588 - .../subversion/libsvn_fs_x/batch_fsync.h | 92 - .../subversion/libsvn_fs_x/cached_data.c | 3536 -- .../subversion/libsvn_fs_x/cached_data.h | 203 - .../subversion/subversion/libsvn_fs_x/caching.c | 682 - .../subversion/subversion/libsvn_fs_x/changes.c | 535 - .../subversion/subversion/libsvn_fs_x/changes.h | 148 - contrib/subversion/subversion/libsvn_fs_x/dag.c | 1083 - contrib/subversion/subversion/libsvn_fs_x/dag.h | 540 - .../subversion/subversion/libsvn_fs_x/dag_cache.c | 1103 - .../subversion/subversion/libsvn_fs_x/dag_cache.h | 174 - contrib/subversion/subversion/libsvn_fs_x/fs.c | 674 - contrib/subversion/subversion/libsvn_fs_x/fs.h | 575 - contrib/subversion/subversion/libsvn_fs_x/fs_id.c | 319 - contrib/subversion/subversion/libsvn_fs_x/fs_id.h | 62 - .../subversion/subversion/libsvn_fs_x/fs_init.h | 33 - contrib/subversion/subversion/libsvn_fs_x/fs_x.c | 1295 - contrib/subversion/subversion/libsvn_fs_x/fs_x.h | 220 - .../subversion/subversion/libsvn_fs_x/hotcopy.c | 792 - .../subversion/subversion/libsvn_fs_x/hotcopy.h | 48 - contrib/subversion/subversion/libsvn_fs_x/id.c | 198 - contrib/subversion/subversion/libsvn_fs_x/id.h | 135 - contrib/subversion/subversion/libsvn_fs_x/index.c | 3933 --- contrib/subversion/subversion/libsvn_fs_x/index.h | 433 - .../subversion/libsvn_fs_x/libsvn_fs_x.pc.in | 12 - contrib/subversion/subversion/libsvn_fs_x/lock.c | 1388 - contrib/subversion/subversion/libsvn_fs_x/lock.h | 116 - .../subversion/subversion/libsvn_fs_x/low_level.c | 1244 - .../subversion/subversion/libsvn_fs_x/low_level.h | 236 - .../subversion/subversion/libsvn_fs_x/noderevs.c | 913 - .../subversion/subversion/libsvn_fs_x/noderevs.h | 142 - contrib/subversion/subversion/libsvn_fs_x/pack.c | 2277 -- contrib/subversion/subversion/libsvn_fs_x/pack.h | 60 - .../subversion/subversion/libsvn_fs_x/recovery.c | 351 - .../subversion/subversion/libsvn_fs_x/recovery.h | 37 - .../subversion/libsvn_fs_x/rep-cache-db.h | 92 - .../subversion/libsvn_fs_x/rep-cache-db.sql | 70 - .../subversion/subversion/libsvn_fs_x/rep-cache.c | 440 - .../subversion/subversion/libsvn_fs_x/rep-cache.h | 110 - contrib/subversion/subversion/libsvn_fs_x/reps.c | 949 - contrib/subversion/subversion/libsvn_fs_x/reps.h | 190 - .../subversion/subversion/libsvn_fs_x/rev_file.c | 539 - .../subversion/subversion/libsvn_fs_x/rev_file.h | 200 - .../subversion/subversion/libsvn_fs_x/revprops.c | 1685 - .../subversion/subversion/libsvn_fs_x/revprops.h | 128 - .../subversion/libsvn_fs_x/string_table.c | 906 - .../subversion/libsvn_fs_x/string_table.h | 133 - .../subversion/subversion/libsvn_fs_x/structure | 336 - .../subversion/libsvn_fs_x/temp_serializer.c | 1185 - .../subversion/libsvn_fs_x/temp_serializer.h | 313 - .../subversion/libsvn_fs_x/transaction.c | 4207 --- .../subversion/libsvn_fs_x/transaction.h | 315 - contrib/subversion/subversion/libsvn_fs_x/tree.c | 3502 -- contrib/subversion/subversion/libsvn_fs_x/tree.h | 117 - contrib/subversion/subversion/libsvn_fs_x/util.c | 733 - contrib/subversion/subversion/libsvn_fs_x/util.h | 460 - contrib/subversion/subversion/libsvn_fs_x/verify.c | 850 - contrib/subversion/subversion/libsvn_fs_x/verify.h | 43 - contrib/subversion/subversion/libsvn_ra/compat.c | 954 - .../subversion/libsvn_ra/debug_reporter.c | 151 - .../subversion/libsvn_ra/debug_reporter.h | 49 - .../subversion/subversion/libsvn_ra/deprecated.c | 522 - .../subversion/subversion/libsvn_ra/deprecated.h | 60 - contrib/subversion/subversion/libsvn_ra/editor.c | 339 - .../subversion/libsvn_ra/libsvn_ra.pc.in | 12 - .../subversion/subversion/libsvn_ra/ra_loader.c | 1601 - .../subversion/subversion/libsvn_ra/ra_loader.h | 601 - contrib/subversion/subversion/libsvn_ra/util.c | 280 - .../subversion/libsvn_ra/wrapper_template.h | 514 - .../libsvn_ra_local/libsvn_ra_local.pc.in | 12 - .../subversion/libsvn_ra_local/ra_local.h | 102 - .../subversion/libsvn_ra_local/ra_plugin.c | 1971 -- .../subversion/libsvn_ra_local/split_url.c | 105 - .../subversion/subversion/libsvn_ra_serf/blame.c | 399 - .../subversion/libsvn_ra_serf/blncache.c | 179 - .../subversion/libsvn_ra_serf/blncache.h | 90 - .../subversion/subversion/libsvn_ra_serf/commit.c | 2534 -- .../subversion/libsvn_ra_serf/eagain_bucket.c | 127 - .../subversion/libsvn_ra_serf/get_deleted_rev.c | 178 - .../subversion/libsvn_ra_serf/get_file.c | 430 - .../subversion/libsvn_ra_serf/get_lock.c | 337 - .../subversion/subversion/libsvn_ra_serf/getdate.c | 171 - .../subversion/libsvn_ra_serf/getlocations.c | 200 - .../libsvn_ra_serf/getlocationsegments.c | 206 - .../subversion/libsvn_ra_serf/getlocks.c | 300 - .../subversion/libsvn_ra_serf/inherited_props.c | 442 - .../subversion/libsvn_ra_serf/libsvn_ra_serf.pc.in | 12 - .../subversion/subversion/libsvn_ra_serf/list.c | 288 - .../subversion/subversion/libsvn_ra_serf/lock.c | 685 - contrib/subversion/subversion/libsvn_ra_serf/log.c | 605 - .../subversion/subversion/libsvn_ra_serf/merge.c | 469 - .../subversion/libsvn_ra_serf/mergeinfo.c | 238 - .../subversion/libsvn_ra_serf/multistatus.c | 759 - .../subversion/subversion/libsvn_ra_serf/options.c | 799 - .../subversion/libsvn_ra_serf/property.c | 922 - .../subversion/subversion/libsvn_ra_serf/ra_serf.h | 1673 - .../subversion/subversion/libsvn_ra_serf/replay.c | 833 - .../subversion/libsvn_ra_serf/request_body.c | 232 - .../subversion/libsvn_ra_serf/sb_bucket.c | 190 - .../subversion/subversion/libsvn_ra_serf/serf.c | 1130 - .../subversion/subversion/libsvn_ra_serf/stat.c | 562 - .../subversion/libsvn_ra_serf/stream_bucket.c | 120 - .../subversion/subversion/libsvn_ra_serf/update.c | 2857 -- .../subversion/subversion/libsvn_ra_serf/util.c | 2154 -- .../subversion/libsvn_ra_serf/util_error.c | 101 - contrib/subversion/subversion/libsvn_ra_serf/xml.c | 1030 - .../subversion/subversion/libsvn_ra_svn/client.c | 3345 -- contrib/subversion/subversion/libsvn_ra_svn/cram.c | 221 - .../subversion/libsvn_ra_svn/cyrus_auth.c | 966 - .../subversion/libsvn_ra_svn/deprecated.c | 321 - .../subversion/subversion/libsvn_ra_svn/editorp.c | 1225 - .../subversion/libsvn_ra_svn/internal_auth.c | 121 - .../subversion/libsvn_ra_svn/libsvn_ra_svn.pc.in | 12 - .../subversion/subversion/libsvn_ra_svn/marshal.c | 3149 -- .../subversion/subversion/libsvn_ra_svn/protocol | 662 - .../subversion/subversion/libsvn_ra_svn/ra_svn.h | 283 - .../subversion/subversion/libsvn_ra_svn/streams.c | 232 - .../subversion/subversion/libsvn_ra_svn/version.c | 33 - .../subversion/libsvn_ra_svn/wrapped_sasl.c | 197 - contrib/subversion/subversion/libsvn_repos/authz.c | 1757 - contrib/subversion/subversion/libsvn_repos/authz.h | 375 - .../subversion/libsvn_repos/authz_info.c | 197 - .../subversion/libsvn_repos/authz_parse.c | 1518 - .../subversion/subversion/libsvn_repos/commit.c | 1443 - .../subversion/subversion/libsvn_repos/compat.c | 179 - .../subversion/libsvn_repos/config_file.c | 390 - .../subversion/libsvn_repos/config_file.h | 74 - .../subversion/libsvn_repos/config_pool.c | 148 - contrib/subversion/subversion/libsvn_repos/delta.c | 991 - .../subversion/libsvn_repos/deprecated.c | 1331 - contrib/subversion/subversion/libsvn_repos/dump.c | 2578 -- .../subversion/libsvn_repos/dump_editor.c | 1040 - .../subversion/subversion/libsvn_repos/fs-wrap.c | 1124 - contrib/subversion/subversion/libsvn_repos/hooks.c | 902 - .../subversion/libsvn_repos/libsvn_repos.pc.in | 12 - contrib/subversion/subversion/libsvn_repos/list.c | 340 - .../subversion/libsvn_repos/load-fs-vtable.c | 1537 - contrib/subversion/subversion/libsvn_repos/load.c | 834 - contrib/subversion/subversion/libsvn_repos/log.c | 2467 -- .../subversion/subversion/libsvn_repos/node_tree.c | 431 - .../subversion/subversion/libsvn_repos/notify.c | 44 - .../subversion/subversion/libsvn_repos/replay.c | 1573 - .../subversion/subversion/libsvn_repos/reporter.c | 1641 - contrib/subversion/subversion/libsvn_repos/repos.c | 2094 -- contrib/subversion/subversion/libsvn_repos/repos.h | 394 - .../subversion/subversion/libsvn_repos/rev_hunt.c | 1747 - .../subversion/subversion/libsvn_subr/adler32.c | 101 - .../subversion/subversion/libsvn_subr/apr_escape.c | 135 - contrib/subversion/subversion/libsvn_subr/atomic.c | 218 - contrib/subversion/subversion/libsvn_subr/auth.c | 914 - contrib/subversion/subversion/libsvn_subr/auth.h | 173 - contrib/subversion/subversion/libsvn_subr/base64.c | 573 - .../subversion/subversion/libsvn_subr/bit_array.c | 194 - .../subversion/libsvn_subr/cache-inprocess.c | 692 - .../subversion/libsvn_subr/cache-membuffer.c | 3480 -- .../subversion/libsvn_subr/cache-memcache.c | 596 - .../subversion/subversion/libsvn_subr/cache-null.c | 157 - contrib/subversion/subversion/libsvn_subr/cache.c | 319 - contrib/subversion/subversion/libsvn_subr/cache.h | 119 - .../subversion/libsvn_subr/cache_config.c | 181 - .../subversion/subversion/libsvn_subr/checksum.c | 856 - .../subversion/subversion/libsvn_subr/checksum.h | 74 - .../subversion/subversion/libsvn_subr/cmdline.c | 1890 -- contrib/subversion/subversion/libsvn_subr/compat.c | 169 - .../subversion/libsvn_subr/compress_lz4.c | 144 - .../subversion/libsvn_subr/compress_zlib.c | 201 - contrib/subversion/subversion/libsvn_subr/config.c | 1371 - .../subversion/libsvn_subr/config_auth.c | 272 - .../subversion/libsvn_subr/config_file.c | 1630 - .../subversion/libsvn_subr/config_impl.h | 165 - .../subversion/libsvn_subr/config_keys.inc | 77 - .../subversion/subversion/libsvn_subr/config_win.c | 283 - contrib/subversion/subversion/libsvn_subr/crypto.c | 705 - contrib/subversion/subversion/libsvn_subr/crypto.h | 141 - contrib/subversion/subversion/libsvn_subr/ctype.c | 336 - contrib/subversion/subversion/libsvn_subr/date.c | 393 - contrib/subversion/subversion/libsvn_subr/debug.c | 155 - .../subversion/subversion/libsvn_subr/deprecated.c | 2015 -- .../subversion/subversion/libsvn_subr/dirent_uri.c | 2854 -- .../subversion/subversion/libsvn_subr/dirent_uri.h | 40 - contrib/subversion/subversion/libsvn_subr/dso.c | 133 - contrib/subversion/subversion/libsvn_subr/encode.c | 107 - contrib/subversion/subversion/libsvn_subr/eol.c | 95 - contrib/subversion/subversion/libsvn_subr/error.c | 935 - .../subversion/libsvn_subr/errorcode.inc | 152 - contrib/subversion/subversion/libsvn_subr/fnv1a.c | 263 - contrib/subversion/subversion/libsvn_subr/fnv1a.h | 101 - .../subversion/subversion/libsvn_subr/genctype.py | 114 - .../subversion/subversion/libsvn_subr/gpg_agent.c | 738 - contrib/subversion/subversion/libsvn_subr/hash.c | 668 - .../subversion/libsvn_subr/internal_statements.h | 76 - .../subversion/libsvn_subr/internal_statements.sql | 47 - contrib/subversion/subversion/libsvn_subr/io.c | 5741 ---- contrib/subversion/subversion/libsvn_subr/iter.c | 171 - .../subversion/libsvn_subr/libsvn_subr.pc.in | 12 - contrib/subversion/subversion/libsvn_subr/lock.c | 60 - contrib/subversion/subversion/libsvn_subr/log.c | 429 - .../subversion/subversion/libsvn_subr/lz4/LICENSE | 24 - .../subversion/subversion/libsvn_subr/lz4/lz4.c | 1481 - .../subversion/libsvn_subr/lz4/lz4internal.h | 466 - .../subversion/libsvn_subr/macos_keychain.c | 264 - contrib/subversion/subversion/libsvn_subr/magic.c | 181 - contrib/subversion/subversion/libsvn_subr/md5.c | 58 - .../subversion/subversion/libsvn_subr/mergeinfo.c | 2636 -- contrib/subversion/subversion/libsvn_subr/mutex.c | 117 - contrib/subversion/subversion/libsvn_subr/nls.c | 103 - .../subversion/libsvn_subr/object_pool.c | 327 - contrib/subversion/subversion/libsvn_subr/opt.c | 1268 - contrib/subversion/subversion/libsvn_subr/opt.h | 54 - .../subversion/libsvn_subr/packed_data.c | 1106 - contrib/subversion/subversion/libsvn_subr/path.c | 1322 - *** 836198 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Fri Jun 11 21:59:41 2021 Return-Path: Delivered-To: dev-commits-src-main@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 63FFF665903; Fri, 11 Jun 2021 21:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1vrs2NsMz4kxN; Fri, 11 Jun 2021 21:59:41 +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 3BB682A7AA; Fri, 11 Jun 2021 21:59:41 +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 15BLxfXK037444; Fri, 11 Jun 2021 21:59:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BLxf70037443; Fri, 11 Jun 2021 21:59:41 GMT (envelope-from git) Date: Fri, 11 Jun 2021 21:59:41 GMT Message-Id: <202106112159.15BLxf70037443@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: 2a279163b9ec - main - src.conf.5: Regen for svnlite removal. 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: 2a279163b9ec00d23033f11ff2d5c485e2f4da8f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 21:59:41 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2a279163b9ec00d23033f11ff2d5c485e2f4da8f commit 2a279163b9ec00d23033f11ff2d5c485e2f4da8f Author: John Baldwin AuthorDate: 2021-06-11 21:57:51 +0000 Commit: John Baldwin CommitDate: 2021-06-11 21:57:51 +0000 src.conf.5: Regen for svnlite removal. Reviewed by: bcr, imp, emaste Differential Revision: https://reviews.freebsd.org/D30738 --- share/man/man5/src.conf.5 | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 0fe0df58144d..0bcadfb5751d 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 5, 2021 +.Dd June 11, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -395,10 +395,6 @@ When set, it enforces these options: .It .Va WITHOUT_PKGBOOTSTRAP .It -.Va WITHOUT_SVN -.It -.Va WITHOUT_SVNLITE -.It .Va WITHOUT_UNBOUND .It .Va WITHOUT_ZFS @@ -616,12 +612,6 @@ This includes the device tree compiler (dtc) and libfdt support library. Do not build .Xr file 1 and related programs. -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_SVNLITE -.El .It Va WITHOUT_FINGER Do not build or install .Xr finger 1 @@ -1295,10 +1285,6 @@ When set, it enforces these options: .It .Va WITHOUT_PKGBOOTSTRAP .It -.Va WITHOUT_SVN -.It -.Va WITHOUT_SVNLITE -.It .Va WITHOUT_UNBOUND .It .Va WITHOUT_ZFS @@ -1503,15 +1489,6 @@ Check staged files are not stale. Neither build nor install .Lb libstats and dependent binaries. -.It Va WITH_SVN -Install -.Xr svnlite 1 -as -.Xr svn 1 . -.It Va WITH_SVNLITE -Build -.Xr svnlite 1 -and related programs. .It Va WITHOUT_SYSCONS Do not build .Xr syscons 4 From owner-dev-commits-src-main@freebsd.org Fri Jun 11 23:09:32 2021 Return-Path: Delivered-To: dev-commits-src-main@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 AFEB9666782; Fri, 11 Jun 2021 23:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1xPS4DFZz4qKq; Fri, 11 Jun 2021 23:09: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 7A82D2B53C; Fri, 11 Jun 2021 23:09: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 15BN9WTp030593; Fri, 11 Jun 2021 23:09:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15BN9WcG030592; Fri, 11 Jun 2021 23:09:32 GMT (envelope-from git) Date: Fri, 11 Jun 2021 23:09:32 GMT Message-Id: <202106112309.15BN9WcG030592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 30b915d7b2d3 - main - an: Remove driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30b915d7b2d372c20cb80fdc75032fd41d6e1161 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 23:09:32 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=30b915d7b2d372c20cb80fdc75032fd41d6e1161 commit 30b915d7b2d372c20cb80fdc75032fd41d6e1161 Author: Olivier Houchard AuthorDate: 2021-06-11 23:08:54 +0000 Commit: Olivier Houchard CommitDate: 2021-06-11 23:08:54 +0000 an: Remove driver Now that an(4) is gone, remove it from GENERIC kernel config files. Reported by: flo --- sys/amd64/conf/GENERIC | 1 - sys/i386/conf/GENERIC | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 696d15698baf..2b49dd4726ec 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -307,7 +307,6 @@ device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm -device an # Aironet 4500/4800 802.11 wireless NICs. device ath # Atheros NICs device ath_pci # Atheros pci/cardbus glue device ath_hal # pci/cardbus chip support diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 288968d84af1..7a3806312f03 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -269,7 +269,6 @@ device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm -device an # Aironet 4500/4800 802.11 wireless NICs. device ath # Atheros NICs device ath_pci # Atheros pci/cardbus glue device ath_hal # pci/cardbus chip support From owner-dev-commits-src-main@freebsd.org Fri Jun 11 23:50:05 2021 Return-Path: Delivered-To: dev-commits-src-main@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 25949666755; Fri, 11 Jun 2021 23:50:05 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1yJD5BCqz4tN4; Fri, 11 Jun 2021 23:50:04 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:2862:40f8:5936:1a27]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 16E9A721E280B; Sat, 12 Jun 2021 01:49:55 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: git: c5a2d8c5f517 - main - sockstat: Use libcasper to capsicumize From: tuexen@freebsd.org In-Reply-To: <202106051237.155CbAbw089529@gitrepo.freebsd.org> Date: Sat, 12 Jun 2021 01:49:54 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1DCF3814-5659-4E29-A4DA-AA487C82BA32@freebsd.org> References: <202106051237.155CbAbw089529@gitrepo.freebsd.org> To: Ryan Moeller X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4G1yJD5BCqz4tN4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE]; local_wl_from(0.00)[freebsd.org] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2021 23:50:05 -0000 > On 5. Jun 2021, at 14:37, Ryan Moeller wrote: >=20 > The branch main has been updated by freqlabs: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc5a2d8c5f517b056bed2af64e6134481= 367773d4 >=20 > commit c5a2d8c5f517b056bed2af64e6134481367773d4 > Author: Ryan Moeller > AuthorDate: 2021-03-26 19:42:19 +0000 > Commit: Ryan Moeller > CommitDate: 2021-06-05 12:36:55 +0000 >=20 > sockstat: Use libcasper to capsicumize Hi Ryan, this breaks sockstat for me: tuexen@bsd14:~ % sockstat -P tcp Assertion failed: (chan !=3D NULL), function cap_xfer_nvlist, file = /usr/home/tuexen/freebsd-src/lib/libcasper/libcasper/libcasper.c, line = 304. Abort (core dumped) Best regards Michael >=20 > Drop rights we do not need. This has to be done after jail_attach. >=20 > Reviewed by: oshogbo > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D26958 From owner-dev-commits-src-main@freebsd.org Sat Jun 12 00:01:34 2021 Return-Path: Delivered-To: dev-commits-src-main@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 91F41666C79; Sat, 12 Jun 2021 00:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1yYV3dyjz4vnJ; Sat, 12 Jun 2021 00:01:34 +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 642372C398; Sat, 12 Jun 2021 00:01:34 +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 15C01YGT007208; Sat, 12 Jun 2021 00:01:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C01Yb6007207; Sat, 12 Jun 2021 00:01:34 GMT (envelope-from git) Date: Sat, 12 Jun 2021 00:01:34 GMT Message-Id: <202106120001.15C01Yb6007207@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: e1a907a25cfa - main - krpc: Acquire ref count of CLIENT for backchannel use 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: e1a907a25cfa422c0d1acaf9f91352ada04f4bca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 00:01:34 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=e1a907a25cfa422c0d1acaf9f91352ada04f4bca commit e1a907a25cfa422c0d1acaf9f91352ada04f4bca Author: Rick Macklem AuthorDate: 2021-06-11 23:57:14 +0000 Commit: Rick Macklem CommitDate: 2021-06-11 23:57:14 +0000 krpc: Acquire ref count of CLIENT for backchannel use Michael Dexter reported a crash in FreeNAS, where the first argument to clnt_bck_svccall() was no longer valid. This argument is a pointer to the callback CLIENT structure, which is free'd when the associated NFSv4 ClientID is free'd. This appears to have occurred because a callback reply was still in the socket receive queue when the CLIENT structure was free'd. This patch acquires a reference count on the CLIENT that is not CLNT_RELEASE()'d until the socket structure is destroyed. This should guarantee that the CLIENT structure is still valid when clnt_bck_svccall() is called. It also adds a check for closed or closing to clnt_bck_svccall() so that it will not process the callback RPC reply message after the ClientID is free'd. Comments by: mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30153 --- sys/fs/nfsserver/nfs_nfsdstate.c | 8 ++++---- sys/rpc/clnt_bck.c | 13 ++++++++++++- sys/rpc/svc.h | 5 +++++ sys/rpc/svc_vc.c | 4 ++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index c16d5b8afdc8..98f5e26d49bb 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -721,8 +721,8 @@ nfsrv_getclient(nfsquad_t clientid, int opflags, struct nfsclient **clpp, cbprogram, NFSV4_CBVERS); if (clp->lc_req.nr_client != NULL) { SVC_ACQUIRE(nd->nd_xprt); - nd->nd_xprt->xp_p2 = - clp->lc_req.nr_client->cl_private; + CLNT_ACQUIRE(clp->lc_req.nr_client); + nd->nd_xprt->xp_p2 = clp->lc_req.nr_client; /* Disable idle timeout. */ nd->nd_xprt->xp_idletimeout = 0; nsep->sess_cbsess.nfsess_xprt = nd->nd_xprt; @@ -6464,8 +6464,8 @@ nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t *sessionid, int *foreaftp) "backchannel\n"); savxprt = sep->sess_cbsess.nfsess_xprt; SVC_ACQUIRE(nd->nd_xprt); - nd->nd_xprt->xp_p2 = - clp->lc_req.nr_client->cl_private; + CLNT_ACQUIRE(clp->lc_req.nr_client); + nd->nd_xprt->xp_p2 = clp->lc_req.nr_client; /* Disable idle timeout. */ nd->nd_xprt->xp_idletimeout = 0; sep->sess_cbsess.nfsess_xprt = nd->nd_xprt; diff --git a/sys/rpc/clnt_bck.c b/sys/rpc/clnt_bck.c index 29109720bce0..2414171bad37 100644 --- a/sys/rpc/clnt_bck.c +++ b/sys/rpc/clnt_bck.c @@ -566,15 +566,26 @@ clnt_bck_destroy(CLIENT *cl) /* * This call is done by the svc code when a backchannel RPC reply is * received. + * For the server end, where callback RPCs to the client are performed, + * xp_p2 points to the "CLIENT" and not the associated "struct ct_data" + * so that svc_vc_destroy() can CLNT_RELEASE() the reference count on it. */ void clnt_bck_svccall(void *arg, struct mbuf *mrep, uint32_t xid) { - struct ct_data *ct = (struct ct_data *)arg; + CLIENT *cl = (CLIENT *)arg; + struct ct_data *ct; struct ct_request *cr; int foundreq; + ct = (struct ct_data *)cl->cl_private; mtx_lock(&ct->ct_lock); + if (ct->ct_closing || ct->ct_closed) { + mtx_unlock(&ct->ct_lock); + m_freem(mrep); + return; + } + ct->ct_upcallrefs++; /* * See if we can match this reply to a request. diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h index dae654d4b08c..8a94d7058972 100644 --- a/sys/rpc/svc.h +++ b/sys/rpc/svc.h @@ -148,6 +148,11 @@ struct __rpc_svcthread; * reference count which tracks the number of currently assigned * worker threads plus one for the service pool's reference. * For NFSv4.1 sessions, a reference is also held for a backchannel. + * xp_p2 - Points to the CLIENT structure for the RPC server end + * (the client end for callbacks). + * Points to the private structure (cl_private) for the + * CLIENT structure for the RPC client end (the server + * end for callbacks). */ typedef struct __rpc_svcxprt { #ifdef _KERNEL diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c index 6cff3434364d..de1baa1417b1 100644 --- a/sys/rpc/svc_vc.c +++ b/sys/rpc/svc_vc.c @@ -500,6 +500,7 @@ static void svc_vc_destroy(SVCXPRT *xprt) { struct cf_conn *cd = (struct cf_conn *)xprt->xp_p1; + CLIENT *cl = (CLIENT *)xprt->xp_p2; SOCKBUF_LOCK(&xprt->xp_socket->so_rcv); if (xprt->xp_upcallset) { @@ -509,6 +510,9 @@ svc_vc_destroy(SVCXPRT *xprt) } SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv); + if (cl != NULL) + CLNT_RELEASE(cl); + svc_vc_destroy_common(xprt); if (cd->mreq) From owner-dev-commits-src-main@freebsd.org Sat Jun 12 01:00:42 2021 Return-Path: Delivered-To: dev-commits-src-main@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 D101F64011F; Sat, 12 Jun 2021 01:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1zsk5dJFz3G4L; Sat, 12 Jun 2021 01:00: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 A9C3D2D00D; Sat, 12 Jun 2021 01:00: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 15C10gRK084686; Sat, 12 Jun 2021 01:00:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C10gg8084685; Sat, 12 Jun 2021 01:00:42 GMT (envelope-from git) Date: Sat, 12 Jun 2021 01:00:42 GMT Message-Id: <202106120100.15C10gg8084685@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: e8424e2947dd - main - bhyve: Register new kevents synchronously. 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: e8424e2947dd8a0e1d3f08295432941b5c5aafb9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 01:00:42 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e8424e2947dd8a0e1d3f08295432941b5c5aafb9 commit e8424e2947dd8a0e1d3f08295432941b5c5aafb9 Author: John Baldwin AuthorDate: 2021-06-12 00:58:54 +0000 Commit: John Baldwin CommitDate: 2021-06-12 01:00:24 +0000 bhyve: Register new kevents synchronously. Change mevent_add*() to synchronously add the new kevent. This permits reporting event registration failures to the caller and avoids failing the registration of other, unrelated events queued up in the same batch. Reviewed by: grehan, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30502 --- usr.sbin/bhyve/mevent.c | 96 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 63 insertions(+), 33 deletions(-) diff --git a/usr.sbin/bhyve/mevent.c b/usr.sbin/bhyve/mevent.c index 2e9059837011..a394b7c5d69f 100644 --- a/usr.sbin/bhyve/mevent.c +++ b/usr.sbin/bhyve/mevent.c @@ -64,8 +64,10 @@ __FBSDID("$FreeBSD$"); #define MEVENT_MAX 64 static pthread_t mevent_tid; +static pthread_once_t mevent_once = PTHREAD_ONCE_INIT; static int mevent_timid = 43; static int mevent_pipefd[2]; +static int mfd; static pthread_mutex_t mevent_lmutex = PTHREAD_MUTEX_INITIALIZER; struct mevent { @@ -124,6 +126,26 @@ mevent_notify(void) } } +static void +mevent_init(void) +{ +#ifndef WITHOUT_CAPSICUM + cap_rights_t rights; +#endif + + mfd = kqueue(); + assert(mfd > 0); + +#ifndef WITHOUT_CAPSICUM + cap_rights_init(&rights, CAP_KQUEUE); + if (caph_rights_limit(mfd, &rights) == -1) + errx(EX_OSERR, "Unable to apply rights for sandbox"); +#endif + + LIST_INIT(&change_head); + LIST_INIT(&global_head); +} + static int mevent_kq_filter(struct mevent *mevp) { @@ -159,8 +181,24 @@ mevent_kq_fflags(struct mevent *mevp) return (0); } +static void +mevent_populate(struct mevent *mevp, struct kevent *kev) +{ + if (mevp->me_type == EVF_TIMER) { + kev->ident = mevp->me_timid; + kev->data = mevp->me_msecs; + } else { + kev->ident = mevp->me_fd; + kev->data = 0; + } + kev->filter = mevent_kq_filter(mevp); + kev->flags = mevent_kq_flags(mevp); + kev->fflags = mevent_kq_fflags(mevp); + kev->udata = mevp; +} + static int -mevent_build(int mfd, struct kevent *kev) +mevent_build(struct kevent *kev) { struct mevent *mevp, *tmpp; int i; @@ -177,17 +215,8 @@ mevent_build(int mfd, struct kevent *kev) */ close(mevp->me_fd); } else { - if (mevp->me_type == EVF_TIMER) { - kev[i].ident = mevp->me_timid; - kev[i].data = mevp->me_msecs; - } else { - kev[i].ident = mevp->me_fd; - kev[i].data = 0; - } - kev[i].filter = mevent_kq_filter(mevp); - kev[i].flags = mevent_kq_flags(mevp); - kev[i].fflags = mevent_kq_fflags(mevp); - kev[i].udata = mevp; + assert((mevp->me_state & EV_ADD) == 0); + mevent_populate(mevp, &kev[i]); i++; } @@ -197,12 +226,6 @@ mevent_build(int mfd, struct kevent *kev) if (mevp->me_state & EV_DELETE) { free(mevp); } else { - /* - * We need to add the event only once, so we can - * reset the EV_ADD bit after it has been propagated - * to the kevent() arguments the first time. - */ - mevp->me_state &= ~EV_ADD; LIST_INSERT_HEAD(&global_head, mevp, me_list); } @@ -234,7 +257,9 @@ mevent_add_state(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param, int state) { + struct kevent kev; struct mevent *lp, *mevp; + int ret; if (tfd < 0 || func == NULL) { return (NULL); @@ -242,6 +267,8 @@ mevent_add_state(int tfd, enum ev_type type, mevp = NULL; + pthread_once(&mevent_once, mevent_init); + mevent_qlock(); /* @@ -262,7 +289,7 @@ mevent_add_state(int tfd, enum ev_type type, } /* - * Allocate an entry, populate it, and add it to the change list. + * Allocate an entry and populate it. */ mevp = calloc(1, sizeof(struct mevent)); if (mevp == NULL) { @@ -277,11 +304,22 @@ mevent_add_state(int tfd, enum ev_type type, mevp->me_type = type; mevp->me_func = func; mevp->me_param = param; - - LIST_INSERT_HEAD(&change_head, mevp, me_list); - mevp->me_cq = 1; mevp->me_state = state; - mevent_notify(); + + /* + * Try to add the event. If this fails, report the failure to + * the caller. + */ + mevent_populate(mevp, &kev); + ret = kevent(mfd, &kev, 1, NULL, 0, NULL); + if (ret == -1) { + free(mevp); + mevp = NULL; + goto exit; + } + + mevp->me_state &= ~EV_ADD; + LIST_INSERT_HEAD(&global_head, mevp, me_list); exit: mevent_qunlock(); @@ -415,7 +453,6 @@ mevent_dispatch(void) struct kevent changelist[MEVENT_MAX]; struct kevent eventlist[MEVENT_MAX]; struct mevent *pipev; - int mfd; int numev; int ret; #ifndef WITHOUT_CAPSICUM @@ -425,14 +462,7 @@ mevent_dispatch(void) mevent_tid = pthread_self(); mevent_set_name(); - mfd = kqueue(); - assert(mfd > 0); - -#ifndef WITHOUT_CAPSICUM - cap_rights_init(&rights, CAP_KQUEUE); - if (caph_rights_limit(mfd, &rights) == -1) - errx(EX_OSERR, "Unable to apply rights for sandbox"); -#endif + pthread_once(&mevent_once, mevent_init); /* * Open the pipe that will be used for other threads to force @@ -466,7 +496,7 @@ mevent_dispatch(void) * to eliminate the extra syscall. Currently better for * debug. */ - numev = mevent_build(mfd, changelist); + numev = mevent_build(changelist); if (numev) { ret = kevent(mfd, changelist, numev, NULL, 0, NULL); if (ret == -1) { From owner-dev-commits-src-main@freebsd.org Sat Jun 12 01:00:43 2021 Return-Path: Delivered-To: dev-commits-src-main@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 EC3C8640121; Sat, 12 Jun 2021 01:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1zsl6NQVz3FyV; Sat, 12 Jun 2021 01:00:43 +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 C17A82CFA3; Sat, 12 Jun 2021 01:00:43 +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 15C10hG9084716; Sat, 12 Jun 2021 01:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C10hJl084715; Sat, 12 Jun 2021 01:00:43 GMT (envelope-from git) Date: Sat, 12 Jun 2021 01:00:43 GMT Message-Id: <202106120100.15C10hJl084715@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: 67d60dcce62c - main - bhyve: Add support for EVFILT_VNODE mevents. 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: 67d60dcce62c08250dceedaf761cb48bc74c75a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 01:00:44 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=67d60dcce62c08250dceedaf761cb48bc74c75a4 commit 67d60dcce62c08250dceedaf761cb48bc74c75a4 Author: John Baldwin AuthorDate: 2021-06-12 00:59:13 +0000 Commit: John Baldwin CommitDate: 2021-06-12 01:00:24 +0000 bhyve: Add support for EVFILT_VNODE mevents. This allows registering an event to watch for changes to a file's attributes. This is a bit imperfect as it would be nice to have a way to determine if an fd can use EVFILT_VNODE successfully. mevent's current structure does not permit that and a failure to register a single kevent impacts several other kevents. Reviewed by: grehan, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30503 --- usr.sbin/bhyve/mevent.c | 33 ++++++++++++++++++++++++++++----- usr.sbin/bhyve/mevent.h | 9 ++++++++- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/mevent.c b/usr.sbin/bhyve/mevent.c index a394b7c5d69f..0c5351cd31a9 100644 --- a/usr.sbin/bhyve/mevent.c +++ b/usr.sbin/bhyve/mevent.c @@ -80,6 +80,7 @@ struct mevent { int me_cq; int me_state; /* Desired kevent flags. */ int me_closefd; + int me_fflags; LIST_ENTRY(mevent) me_list; }; @@ -165,6 +166,9 @@ mevent_kq_filter(struct mevent *mevp) if (mevp->me_type == EVF_SIGNAL) retval = EVFILT_SIGNAL; + if (mevp->me_type == EVF_VNODE) + retval = EVFILT_VNODE; + return (retval); } @@ -177,8 +181,18 @@ mevent_kq_flags(struct mevent *mevp) static int mevent_kq_fflags(struct mevent *mevp) { - /* XXX nothing yet, perhaps EV_EOF for reads ? */ - return (0); + int retval; + + retval = 0; + + switch (mevp->me_type) { + case EVF_VNODE: + if ((mevp->me_fflags & EVFF_ATTRIB) != 0) + retval |= NOTE_ATTRIB; + break; + } + + return (retval); } static void @@ -255,7 +269,7 @@ mevent_handle(struct kevent *kev, int numev) static struct mevent * mevent_add_state(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param, - int state) + int state, int fflags) { struct kevent kev; struct mevent *lp, *mevp; @@ -305,6 +319,7 @@ mevent_add_state(int tfd, enum ev_type type, mevp->me_func = func; mevp->me_param = param; mevp->me_state = state; + mevp->me_fflags = fflags; /* * Try to add the event. If this fails, report the failure to @@ -332,7 +347,15 @@ mevent_add(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param) { - return (mevent_add_state(tfd, type, func, param, EV_ADD)); + return (mevent_add_state(tfd, type, func, param, EV_ADD, 0)); +} + +struct mevent * +mevent_add_flags(int tfd, enum ev_type type, int fflags, + void (*func)(int, enum ev_type, void *), void *param) +{ + + return (mevent_add_state(tfd, type, func, param, EV_ADD, fflags)); } struct mevent * @@ -340,7 +363,7 @@ mevent_add_disabled(int tfd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param) { - return (mevent_add_state(tfd, type, func, param, EV_ADD | EV_DISABLE)); + return (mevent_add_state(tfd, type, func, param, EV_ADD | EV_DISABLE, 0)); } static int diff --git a/usr.sbin/bhyve/mevent.h b/usr.sbin/bhyve/mevent.h index 503ec415a3b5..a26293867a09 100644 --- a/usr.sbin/bhyve/mevent.h +++ b/usr.sbin/bhyve/mevent.h @@ -35,14 +35,21 @@ enum ev_type { EVF_READ, EVF_WRITE, EVF_TIMER, - EVF_SIGNAL + EVF_SIGNAL, + EVF_VNODE, }; +/* Filter flags for EVF_VNODE */ +#define EVFF_ATTRIB 0x0001 + struct mevent; struct mevent *mevent_add(int fd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param); +struct mevent *mevent_add_flags(int fd, enum ev_type type, int fflags, + void (*func)(int, enum ev_type, void *), + void *param); struct mevent *mevent_add_disabled(int fd, enum ev_type type, void (*func)(int, enum ev_type, void *), void *param); From owner-dev-commits-src-main@freebsd.org Sat Jun 12 01:00:45 2021 Return-Path: Delivered-To: dev-commits-src-main@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 594AF64048B; Sat, 12 Jun 2021 01:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1zsn0TZKz3G1j; Sat, 12 Jun 2021 01:00:45 +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 E3E472CEA8; Sat, 12 Jun 2021 01:00:44 +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 15C10ibW084741; Sat, 12 Jun 2021 01:00:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C10iFD084740; Sat, 12 Jun 2021 01:00:44 GMT (envelope-from git) Date: Sat, 12 Jun 2021 01:00:44 GMT Message-Id: <202106120100.15C10iFD084740@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: 8794846a91c5 - main - bhyve: Add support for handling disk resize events to block_if. 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: 8794846a91c5429c612ba939c61ebf8f1ff1a628 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 01:00:45 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8794846a91c5429c612ba939c61ebf8f1ff1a628 commit 8794846a91c5429c612ba939c61ebf8f1ff1a628 Author: John Baldwin AuthorDate: 2021-06-12 00:59:25 +0000 Commit: John Baldwin CommitDate: 2021-06-12 01:00:24 +0000 bhyve: Add support for handling disk resize events to block_if. Allow clients of blockif to register a resize callback handler. When a callback is registered, register an EVFILT_VNODE kevent watching the backing store for a change in the file's attributes. If the size has changed when the kevent fires, invoke the clients' callback. Currently resize detection is limited to backing stores that support EVFILT_VNODE kevents such as regular files. Reviewed by: grehan, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30504 --- usr.sbin/bhyve/block_if.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++- usr.sbin/bhyve/block_if.h | 5 ++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c index ae09bc71d622..98c0f9f5f38b 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -115,6 +115,9 @@ struct blockif_ctxt { pthread_cond_t bc_cond; pthread_cond_t bc_paused_cond; pthread_cond_t bc_work_done_cond; + blockif_resize_cb *bc_resize_cb; + void *bc_resize_cb_arg; + struct mevent *bc_resize_event; /* Request elements and free/pending/busy queues */ TAILQ_HEAD(, blockif_elem) bc_freeq; @@ -532,7 +535,7 @@ blockif_open(nvlist_t *nvl, const char *ident) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_FSYNC, CAP_IOCTL, CAP_READ, CAP_SEEK, - CAP_WRITE); + CAP_WRITE, CAP_FSTAT, CAP_EVENT); if (ro) cap_rights_clear(&rights, CAP_FSYNC, CAP_WRITE); @@ -643,6 +646,62 @@ err: return (NULL); } +static void +blockif_resized(int fd, enum ev_type type, void *arg) +{ + struct blockif_ctxt *bc; + struct stat sb; + + if (fstat(fd, &sb) != 0) + return; + + bc = arg; + pthread_mutex_lock(&bc->bc_mtx); + if (sb.st_size != bc->bc_size) { + bc->bc_size = sb.st_size; + bc->bc_resize_cb(bc, bc->bc_resize_cb_arg, bc->bc_size); + } + pthread_mutex_unlock(&bc->bc_mtx); +} + +int +blockif_register_resize_callback(struct blockif_ctxt *bc, blockif_resize_cb *cb, + void *cb_arg) +{ + struct stat sb; + int err; + + if (cb == NULL) + return (EINVAL); + + pthread_mutex_lock(&bc->bc_mtx); + if (bc->bc_resize_cb != NULL) { + err = EBUSY; + goto out; + } + + assert(bc->bc_closing == 0); + + if (fstat(bc->bc_fd, &sb) != 0) { + err = errno; + goto out; + } + + bc->bc_resize_event = mevent_add_flags(bc->bc_fd, EVF_VNODE, + EVFF_ATTRIB, blockif_resized, bc); + if (bc->bc_resize_event == NULL) { + err = ENXIO; + goto out; + } + + bc->bc_resize_cb = cb; + bc->bc_resize_cb_arg = cb_arg; +out: + pthread_mutex_unlock(&bc->bc_mtx); + + return (err); +} + static int blockif_request(struct blockif_ctxt *bc, struct blockif_req *breq, enum blockop op) @@ -796,6 +855,8 @@ blockif_close(struct blockif_ctxt *bc) */ pthread_mutex_lock(&bc->bc_mtx); bc->bc_closing = 1; + if (bc->bc_resize_event != NULL) + mevent_disable(bc->bc_resize_event); pthread_mutex_unlock(&bc->bc_mtx); pthread_cond_broadcast(&bc->bc_cond); for (i = 0; i < BLOCKIF_NUMTHR; i++) diff --git a/usr.sbin/bhyve/block_if.h b/usr.sbin/bhyve/block_if.h index 87ae4d169969..0407ff43cf94 100644 --- a/usr.sbin/bhyve/block_if.h +++ b/usr.sbin/bhyve/block_if.h @@ -63,8 +63,13 @@ struct blockif_req { }; struct blockif_ctxt; + +typedef void blockif_resize_cb(struct blockif_ctxt *, void *, size_t); + int blockif_legacy_config(nvlist_t *nvl, const char *opts); struct blockif_ctxt *blockif_open(nvlist_t *nvl, const char *ident); +int blockif_register_resize_callback(struct blockif_ctxt *bc, + blockif_resize_cb *cb, void *cb_arg); off_t blockif_size(struct blockif_ctxt *bc); void blockif_chs(struct blockif_ctxt *bc, uint16_t *c, uint8_t *h, uint8_t *s); From owner-dev-commits-src-main@freebsd.org Sat Jun 12 01:00:46 2021 Return-Path: Delivered-To: dev-commits-src-main@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 4A8426403CD; Sat, 12 Jun 2021 01:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1zsp10rGz3Fr2; Sat, 12 Jun 2021 01:00:46 +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 039612CEA9; Sat, 12 Jun 2021 01:00:46 +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 15C10jPh084765; Sat, 12 Jun 2021 01:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C10jDp084764; Sat, 12 Jun 2021 01:00:45 GMT (envelope-from git) Date: Sat, 12 Jun 2021 01:00:45 GMT Message-Id: <202106120100.15C10jDp084764@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: c06676bee3d2 - main - bhyve: Split out a lower-level helper for VirtIO interrupts. 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: c06676bee3d228ac18c5ed3604304e932eb84c1e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 01:00:46 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c06676bee3d228ac18c5ed3604304e932eb84c1e commit c06676bee3d228ac18c5ed3604304e932eb84c1e Author: John Baldwin AuthorDate: 2021-06-12 00:59:35 +0000 Commit: John Baldwin CommitDate: 2021-06-12 01:00:25 +0000 bhyve: Split out a lower-level helper for VirtIO interrupts. This allows device models to assert VirtIO interrupts for reasons other than publishing changes to a VirtIO ring such as configuration changes. Reviewed by: grehan, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30505 --- usr.sbin/bhyve/virtio.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h index 4c7b9de83125..5731baa0dd0d 100644 --- a/usr.sbin/bhyve/virtio.h +++ b/usr.sbin/bhyve/virtio.h @@ -348,24 +348,35 @@ vq_has_descs(struct vqueue_info *vq) } /* - * Deliver an interrupt to guest on the given virtual queue - * (if possible, or a generic MSI interrupt if not using MSI-X). + * Deliver an interrupt to the guest for a specific MSI-X queue or + * event. */ static inline void -vq_interrupt(struct virtio_softc *vs, struct vqueue_info *vq) +vi_interrupt(struct virtio_softc *vs, uint8_t isr, uint16_t msix_idx) { if (pci_msix_enabled(vs->vs_pi)) - pci_generate_msix(vs->vs_pi, vq->vq_msix_idx); + pci_generate_msix(vs->vs_pi, msix_idx); else { VS_LOCK(vs); - vs->vs_isr |= VIRTIO_PCI_ISR_INTR; + vs->vs_isr |= isr; pci_generate_msi(vs->vs_pi, 0); pci_lintr_assert(vs->vs_pi); VS_UNLOCK(vs); } } +/* + * Deliver an interrupt to the guest on the given virtual queue (if + * possible, or a generic MSI interrupt if not using MSI-X). + */ +static inline void +vq_interrupt(struct virtio_softc *vs, struct vqueue_info *vq) +{ + + vi_interrupt(vs, VIRTIO_PCI_ISR_INTR, vq->vq_msix_idx); +} + static inline void vq_kick_enable(struct vqueue_info *vq) { From owner-dev-commits-src-main@freebsd.org Sat Jun 12 01:00:47 2021 Return-Path: Delivered-To: dev-commits-src-main@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 5BEC56403D7; Sat, 12 Jun 2021 01:00:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G1zsq1wTBz3G4j; Sat, 12 Jun 2021 01:00:47 +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 2989E2CFA4; Sat, 12 Jun 2021 01:00:47 +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 15C10lrg084789; Sat, 12 Jun 2021 01:00:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C10lB2084788; Sat, 12 Jun 2021 01:00:47 GMT (envelope-from git) Date: Sat, 12 Jun 2021 01:00:47 GMT Message-Id: <202106120100.15C10lB2084788@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: 2349cda44fea - main - bhyve vtblk: Inform guests of disk resize events. 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: 2349cda44fea17c089b026e743ec8f03199019eb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 01:00:47 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2349cda44fea17c089b026e743ec8f03199019eb commit 2349cda44fea17c089b026e743ec8f03199019eb Author: John Baldwin AuthorDate: 2021-06-12 00:59:46 +0000 Commit: John Baldwin CommitDate: 2021-06-12 01:00:25 +0000 bhyve vtblk: Inform guests of disk resize events. Register a resize callback with the blockif interface. When the callback fires, update the size of the disk and notify the guest via a configuration change interrupt. Reviewed by: grehan, markj MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30506 --- usr.sbin/bhyve/pci_virtio_block.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c index 8a172c54eda7..3718b2d7eff0 100644 --- a/usr.sbin/bhyve/pci_virtio_block.c +++ b/usr.sbin/bhyve/pci_virtio_block.c @@ -3,7 +3,7 @@ * * Copyright (c) 2011 NetApp, Inc. * All rights reserved. - * Copyright 2020 Joyent, Inc. + * Copyright 2020-2021 Joyent, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -436,6 +436,18 @@ pci_vtblk_notify(void *vsc, struct vqueue_info *vq) pci_vtblk_proc(sc, vq); } +static void +pci_vtblk_resized(struct blockif_ctxt *bctxt, void *arg, size_t new_size) +{ + struct pci_vtblk_softc *sc; + + sc = arg; + + sc->vbsc_cfg.vbc_capacity = new_size / VTBLK_BSIZE; /* 512-byte units */ + vi_interrupt(&sc->vbsc_vs, VIRTIO_PCI_ISR_CONFIG, + sc->vbsc_vs.vs_msix_cfg_idx); +} + static int pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) { @@ -541,6 +553,7 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) return (1); } vi_set_io_bar(&sc->vbsc_vs, 0); + blockif_register_resize_callback(sc->bc, pci_vtblk_resized, sc); return (0); } From owner-dev-commits-src-main@freebsd.org Sat Jun 12 01:56:08 2021 Return-Path: Delivered-To: dev-commits-src-main@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 9D766641641; Sat, 12 Jun 2021 01:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G215h3nkcz3M2D; Sat, 12 Jun 2021 01:56:08 +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 66B9B2DC47; Sat, 12 Jun 2021 01:56:08 +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 15C1u8pi055754; Sat, 12 Jun 2021 01:56:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C1u8Vd055753; Sat, 12 Jun 2021 01:56:08 GMT (envelope-from git) Date: Sat, 12 Jun 2021 01:56:08 GMT Message-Id: <202106120156.15C1u8Vd055753@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: 40cc9a3a6b81 - main - param.h: Bump __FreeBSD_version to 1400022 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: 40cc9a3a6b81a65a03712dfd93bbed48552a97ad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 01:56:08 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=40cc9a3a6b81a65a03712dfd93bbed48552a97ad commit 40cc9a3a6b81a65a03712dfd93bbed48552a97ad Author: Rick Macklem AuthorDate: 2021-06-12 01:53:02 +0000 Commit: Rick Macklem CommitDate: 2021-06-12 01:53:02 +0000 param.h: Bump __FreeBSD_version to 1400022 Commit e1a907a25cfa changed the internal KAPI between the krpc and nfsserver. As such, both modules must be rebuilt from sources. Bump __FreeBSD_version to 1400022. --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index afcba3990b07..0f5413e2f56c 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400021 +#define __FreeBSD_version 1400022 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-main@freebsd.org Sat Jun 12 02:02:40 2021 Return-Path: Delivered-To: dev-commits-src-main@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 BE10B64176B; Sat, 12 Jun 2021 02:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G21FD52YWz3MYK; Sat, 12 Jun 2021 02:02: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 94BA72DD79; Sat, 12 Jun 2021 02:02: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 15C22eu6069337; Sat, 12 Jun 2021 02:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C22e81069336; Sat, 12 Jun 2021 02:02:40 GMT (envelope-from git) Date: Sat, 12 Jun 2021 02:02:40 GMT Message-Id: <202106120202.15C22e81069336@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: 5860696e69ec - main - UPDATING: Add entry for __FreeBSD_version bump to 1400022 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: 5860696e69ec6d08bbe553c4c376efba3511b962 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 02:02:40 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5860696e69ec6d08bbe553c4c376efba3511b962 commit 5860696e69ec6d08bbe553c4c376efba3511b962 Author: Rick Macklem AuthorDate: 2021-06-12 01:59:36 +0000 Commit: Rick Macklem CommitDate: 2021-06-12 01:59:36 +0000 UPDATING: Add entry for __FreeBSD_version bump to 1400022 --- UPDATING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPDATING b/UPDATING index ed27ec0fb9c1..6206e658d524 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20210611: + Commit e1a907a25cfa changed the internal KAPI between the krpc + and nfsserver. As such, both modules must be rebuilt from + sources. Bump __FreeBSD_version to 1400022. + 20210608: The vendor/openzfs branch was renamed to vendor/openzfs/legacy to start tracking OpenZFS upstream more closely. Please see From owner-dev-commits-src-main@freebsd.org Sat Jun 12 06:36:23 2021 Return-Path: Delivered-To: dev-commits-src-main@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 13B6564503D; Sat, 12 Jun 2021 06:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G27K267jYz3vV6; Sat, 12 Jun 2021 06:36:22 +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 B7093191B; Sat, 12 Jun 2021 06:36:22 +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 15C6aMcs027797; Sat, 12 Jun 2021 06:36:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C6aMAl027796; Sat, 12 Jun 2021 06:36:22 GMT (envelope-from git) Date: Sat, 12 Jun 2021 06:36:22 GMT Message-Id: <202106120636.15C6aMAl027796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: dbaf4b653976 - main - arm: ti am335x ehrpwm remove sysctl interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbaf4b653976051a788f3ca7cced10064cd9cd5a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 06:36:23 -0000 The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=dbaf4b653976051a788f3ca7cced10064cd9cd5a commit dbaf4b653976051a788f3ca7cced10064cd9cd5a Author: Oskar Holmlund AuthorDate: 2021-06-12 08:24:55 +0000 Commit: Oskar Holmlund CommitDate: 2021-06-12 08:24:55 +0000 arm: ti am335x ehrpwm remove sysctl interface To minimize the maintenance time of this driver when new features are added the legacy sysctl interface has to go. Approved by: manu (mentor) Reviewed by: Dr. Rolf Jansen (freebsd-rj_obsigna.com) Differential revision: https://reviews.freebsd.org/D29546 --- sys/arm/ti/am335x/am335x_ehrpwm.c | 224 +------------------------------------- 1 file changed, 3 insertions(+), 221 deletions(-) diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c index 619fdae2bcdb..ef618c18cf46 100644 --- a/sys/arm/ti/am335x/am335x_ehrpwm.c +++ b/sys/arm/ti/am335x/am335x_ehrpwm.c @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -53,17 +52,6 @@ __FBSDID("$FreeBSD$"); * Enhanced resolution PWM driver. Many of the advanced featues of the hardware * are not supported by this driver. What is implemented here is simple * variable-duty-cycle PWM output. - * - * Note that this driver was historically configured using a set of sysctl - * variables/procs, and later gained support for the PWM(9) API. The sysctl - * code is still present to support existing apps, but that interface is - * considered deprecated. - * - * An important caveat is that the original sysctl interface and the new PWM API - * cannot both be used at once. If both interfaces are used to change - * configuration, it's quite likely you won't get the expected results. Also, - * reading the sysctl values after configuring via PWM will not return the right - * results. ******************************************************************************/ /* In ticks */ @@ -160,8 +148,6 @@ static device_probe_t am335x_ehrpwm_probe; static device_attach_t am335x_ehrpwm_attach; static device_detach_t am335x_ehrpwm_detach; -static int am335x_ehrpwm_clkdiv[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; - struct ehrpwm_channel { u_int duty; /* on duration, in ns */ bool enabled; /* channel enabled? */ @@ -176,18 +162,6 @@ struct am335x_ehrpwm_softc { struct resource *sc_mem_res; int sc_mem_rid; - /* Things used for configuration via sysctl [deprecated]. */ - int sc_pwm_clkdiv; - int sc_pwm_freq; - struct sysctl_oid *sc_clkdiv_oid; - struct sysctl_oid *sc_freq_oid; - struct sysctl_oid *sc_period_oid; - struct sysctl_oid *sc_chanA_oid; - struct sysctl_oid *sc_chanB_oid; - uint32_t sc_pwm_period; - uint32_t sc_pwm_dutyA; - uint32_t sc_pwm_dutyB; - /* Things used for configuration via pwm(9) api. */ u_int sc_clkfreq; /* frequency in Hz */ u_int sc_clktick; /* duration in ns */ @@ -311,167 +285,6 @@ am335x_ehrpwm_cfg_period(struct am335x_ehrpwm_softc *sc, u_int period) return (true); } -static void -am335x_ehrpwm_freq(struct am335x_ehrpwm_softc *sc) -{ - int clkdiv; - - clkdiv = am335x_ehrpwm_clkdiv[sc->sc_pwm_clkdiv]; - sc->sc_pwm_freq = PWM_CLOCK / (1 * clkdiv) / sc->sc_pwm_period; -} - -static int -am335x_ehrpwm_sysctl_freq(SYSCTL_HANDLER_ARGS) -{ - int clkdiv, error, freq, i, period; - struct am335x_ehrpwm_softc *sc; - uint32_t reg; - - sc = (struct am335x_ehrpwm_softc *)arg1; - - PWM_LOCK(sc); - freq = sc->sc_pwm_freq; - PWM_UNLOCK(sc); - - error = sysctl_handle_int(oidp, &freq, sizeof(freq), req); - if (error != 0 || req->newptr == NULL) - return (error); - - if (freq > PWM_CLOCK) - freq = PWM_CLOCK; - - PWM_LOCK(sc); - if (freq != sc->sc_pwm_freq) { - for (i = nitems(am335x_ehrpwm_clkdiv) - 1; i >= 0; i--) { - clkdiv = am335x_ehrpwm_clkdiv[i]; - period = PWM_CLOCK / clkdiv / freq; - if (period > USHRT_MAX) - break; - sc->sc_pwm_clkdiv = i; - sc->sc_pwm_period = period; - } - /* Reset the duty cycle settings. */ - sc->sc_pwm_dutyA = 0; - sc->sc_pwm_dutyB = 0; - EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); - EPWM_WRITE2(sc, EPWM_CMPB, sc->sc_pwm_dutyB); - /* Update the clkdiv settings. */ - reg = EPWM_READ2(sc, EPWM_TBCTL); - reg &= ~TBCTL_CLKDIV_MASK; - reg |= TBCTL_CLKDIV(sc->sc_pwm_clkdiv); - EPWM_WRITE2(sc, EPWM_TBCTL, reg); - /* Update the period settings. */ - EPWM_WRITE2(sc, EPWM_TBPRD, sc->sc_pwm_period - 1); - am335x_ehrpwm_freq(sc); - } - PWM_UNLOCK(sc); - - return (0); -} - -static int -am335x_ehrpwm_sysctl_clkdiv(SYSCTL_HANDLER_ARGS) -{ - int error, i, clkdiv; - struct am335x_ehrpwm_softc *sc; - uint32_t reg; - - sc = (struct am335x_ehrpwm_softc *)arg1; - - PWM_LOCK(sc); - clkdiv = am335x_ehrpwm_clkdiv[sc->sc_pwm_clkdiv]; - PWM_UNLOCK(sc); - - error = sysctl_handle_int(oidp, &clkdiv, sizeof(clkdiv), req); - if (error != 0 || req->newptr == NULL) - return (error); - - PWM_LOCK(sc); - if (clkdiv != am335x_ehrpwm_clkdiv[sc->sc_pwm_clkdiv]) { - for (i = 0; i < nitems(am335x_ehrpwm_clkdiv); i++) - if (clkdiv >= am335x_ehrpwm_clkdiv[i]) - sc->sc_pwm_clkdiv = i; - - reg = EPWM_READ2(sc, EPWM_TBCTL); - reg &= ~TBCTL_CLKDIV_MASK; - reg |= TBCTL_CLKDIV(sc->sc_pwm_clkdiv); - EPWM_WRITE2(sc, EPWM_TBCTL, reg); - am335x_ehrpwm_freq(sc); - } - PWM_UNLOCK(sc); - - return (0); -} - -static int -am335x_ehrpwm_sysctl_duty(SYSCTL_HANDLER_ARGS) -{ - struct am335x_ehrpwm_softc *sc = (struct am335x_ehrpwm_softc*)arg1; - int error; - uint32_t duty; - - if (oidp == sc->sc_chanA_oid) - duty = sc->sc_pwm_dutyA; - else - duty = sc->sc_pwm_dutyB; - error = sysctl_handle_int(oidp, &duty, 0, req); - - if (error != 0 || req->newptr == NULL) - return (error); - - if (duty > sc->sc_pwm_period) { - device_printf(sc->sc_dev, "Duty cycle can't be greater then period\n"); - return (EINVAL); - } - - PWM_LOCK(sc); - if (oidp == sc->sc_chanA_oid) { - sc->sc_pwm_dutyA = duty; - EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); - } - else { - sc->sc_pwm_dutyB = duty; - EPWM_WRITE2(sc, EPWM_CMPB, sc->sc_pwm_dutyB); - } - PWM_UNLOCK(sc); - - return (error); -} - -static int -am335x_ehrpwm_sysctl_period(SYSCTL_HANDLER_ARGS) -{ - struct am335x_ehrpwm_softc *sc = (struct am335x_ehrpwm_softc*)arg1; - int error; - uint32_t period; - - period = sc->sc_pwm_period; - error = sysctl_handle_int(oidp, &period, 0, req); - - if (error != 0 || req->newptr == NULL) - return (error); - - if (period < 1) - return (EINVAL); - - if (period > USHRT_MAX) - period = USHRT_MAX; - - PWM_LOCK(sc); - /* Reset the duty cycle settings. */ - sc->sc_pwm_dutyA = 0; - sc->sc_pwm_dutyB = 0; - EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); - EPWM_WRITE2(sc, EPWM_CMPB, sc->sc_pwm_dutyB); - /* Update the period settings. */ - sc->sc_pwm_period = period; - EPWM_WRITE2(sc, EPWM_TBPRD, period - 1); - am335x_ehrpwm_freq(sc); - PWM_UNLOCK(sc); - - return (error); -} - static int am335x_ehrpwm_channel_count(device_t dev, u_int *nchannel) { @@ -568,8 +381,6 @@ am335x_ehrpwm_attach(device_t dev) { struct am335x_ehrpwm_softc *sc; uint32_t reg; - struct sysctl_ctx_list *ctx; - struct sysctl_oid *tree; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -583,43 +394,14 @@ am335x_ehrpwm_attach(device_t dev) goto fail; } - /* Init sysctl interface */ - ctx = device_get_sysctl_ctx(sc->sc_dev); - tree = device_get_sysctl_tree(sc->sc_dev); - - sc->sc_clkdiv_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "clkdiv", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, - am335x_ehrpwm_sysctl_clkdiv, "I", "PWM clock prescaler"); - - sc->sc_freq_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "freq", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, - am335x_ehrpwm_sysctl_freq, "I", "PWM frequency"); - - sc->sc_period_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "period", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, - am335x_ehrpwm_sysctl_period, "I", "PWM period"); - - sc->sc_chanA_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "dutyA", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, - am335x_ehrpwm_sysctl_duty, "I", "Channel A duty cycles"); - - sc->sc_chanB_oid = SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "dutyB", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, - am335x_ehrpwm_sysctl_duty, "I", "Channel B duty cycles"); - /* CONFIGURE EPWM1 */ reg = EPWM_READ2(sc, EPWM_TBCTL); reg &= ~(TBCTL_CLKDIV_MASK | TBCTL_HSPCLKDIV_MASK); EPWM_WRITE2(sc, EPWM_TBCTL, reg); - sc->sc_pwm_period = DEFAULT_PWM_PERIOD; - sc->sc_pwm_dutyA = 0; - sc->sc_pwm_dutyB = 0; - am335x_ehrpwm_freq(sc); - - EPWM_WRITE2(sc, EPWM_TBPRD, sc->sc_pwm_period - 1); - EPWM_WRITE2(sc, EPWM_CMPA, sc->sc_pwm_dutyA); - EPWM_WRITE2(sc, EPWM_CMPB, sc->sc_pwm_dutyB); + EPWM_WRITE2(sc, EPWM_TBPRD, DEFAULT_PWM_PERIOD - 1); + EPWM_WRITE2(sc, EPWM_CMPA, 0); + EPWM_WRITE2(sc, EPWM_CMPB, 0); EPWM_WRITE2(sc, EPWM_AQCTLA, (AQCTL_ZRO_SET | AQCTL_CAU_CLEAR)); EPWM_WRITE2(sc, EPWM_AQCTLB, (AQCTL_ZRO_SET | AQCTL_CBU_CLEAR)); From owner-dev-commits-src-main@freebsd.org Sat Jun 12 07:04:10 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2CF8D645A82; Sat, 12 Jun 2021 07:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G27x60pLlz3wDs; Sat, 12 Jun 2021 07:04: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 032EB1975; Sat, 12 Jun 2021 07:04: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 15C749GK067829; Sat, 12 Jun 2021 07:04:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C749aB067828; Sat, 12 Jun 2021 07:04:09 GMT (envelope-from git) Date: Sat, 12 Jun 2021 07:04:09 GMT Message-Id: <202106120704.15C749aB067828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: e7424879e3f6 - main - arm: ti am335x ehrpwm add support for flags (PWM_POLARITY_INVERTED) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7424879e3f60f87f0dd99ef7345d9c48f1008fa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 07:04:10 -0000 The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=e7424879e3f60f87f0dd99ef7345d9c48f1008fa commit e7424879e3f60f87f0dd99ef7345d9c48f1008fa Author: Oskar Holmlund AuthorDate: 2021-06-12 08:54:31 +0000 Commit: Oskar Holmlund CommitDate: 2021-06-12 08:54:31 +0000 arm: ti am335x ehrpwm add support for flags (PWM_POLARITY_INVERTED) Add support for invert the polarity of the PWM signal. Cleanup and add comments in the initialization code. Add and fix register defines. Approved by: manu (mentor) Differential revision: https://reviews.freebsd.org/D29547 --- sys/arm/ti/am335x/am335x_ehrpwm.c | 118 +++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 8 deletions(-) diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c index ef618c18cf46..47a86aee8dcb 100644 --- a/sys/arm/ti/am335x/am335x_ehrpwm.c +++ b/sys/arm/ti/am335x/am335x_ehrpwm.c @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "pwmbus_if.h" #include "am335x_pwm.h" @@ -72,7 +74,12 @@ __FBSDID("$FreeBSD$"); bus_write_2((_sc)->sc_mem_res, reg, value) #define EPWM_TBCTL 0x00 -#define TBCTL_FREERUN (2 << 14) +/* see 15.2.2.11 for the first two, used in debug situations */ +#define TBCTL_FREERUN_STOP_NEXT_TBC_INCREMENT (0 << 14) +#define TBCTL_FREERUN_STOP_COMPLETE_CYCLE (1 << 14) +/* ignore suspend control signal */ +#define TBCTL_FREERUN (2 << 14) + #define TBCTL_PHDIR_UP (1 << 13) #define TBCTL_PHDIR_DOWN (0 << 13) #define TBCTL_CLKDIV(x) ((x) << 10) @@ -81,9 +88,9 @@ __FBSDID("$FreeBSD$"); #define TBCTL_HSPCLKDIV_MASK (3 << 7) #define TBCTL_SYNCOSEL_DISABLED (3 << 4) #define TBCTL_PRDLD_SHADOW (0 << 3) -#define TBCTL_PRDLD_IMMEDIATE (0 << 3) -#define TBCTL_PHSEN_ENABLED (1 << 2) +#define TBCTL_PRDLD_IMMEDIATE (1 << 3) #define TBCTL_PHSEN_DISABLED (0 << 2) +#define TBCTL_PHSEN_ENABLED (1 << 2) #define TBCTL_CTRMODE_MASK (3) #define TBCTL_CTRMODE_UP (0 << 0) #define TBCTL_CTRMODE_DOWN (1 << 0) @@ -136,8 +143,24 @@ __FBSDID("$FreeBSD$"); #define AQCSFRC(chan, hilo) ((hilo) << (2 * chan)) /* Trip-Zone module */ +#define EPWM_TZSEL 0x24 #define EPWM_TZCTL 0x28 #define EPWM_TZFLG 0x2C + +/* Dead band */ +#define EPWM_DBCTL 0x1E +#define DBCTL_MASK (3 << 0) +#define DBCTL_BYPASS 0 +#define DBCTL_RISING_EDGE 1 +#define DBCTL_FALLING_EDGE 2 +#define DBCTL_BOTH_EDGE 3 + +/* PWM-chopper */ +#define EPWM_PCCTL 0x3C +#define PCCTL_CHPEN_MASK (1 << 0) +#define PCCTL_CHPEN_DISABLE 0 +#define PCCTL_CHPEN_ENABLE 1 + /* High-Resolution PWM */ #define EPWM_HRCTL 0x40 #define HRCTL_DELMODE_BOTH 3 @@ -329,6 +352,60 @@ am335x_ehrpwm_channel_get_config(device_t dev, u_int channel, return (0); } +static int +am335x_ehrpwm_channel_set_flags(device_t dev, u_int channel, + uint32_t flags) +{ + struct am335x_ehrpwm_softc *sc; + + if (channel >= NUM_CHANNELS) + return (EINVAL); + + sc = device_get_softc(dev); + + PWM_LOCK(sc); + if (flags & PWM_POLARITY_INVERTED) { + sc->sc_channels[channel].inverted = true; + /* Action-Qualifier 15.2.2.5 */ + if (channel == 0) + EPWM_WRITE2(sc, EPWM_AQCTLA, + (AQCTL_ZRO_CLEAR | AQCTL_CAU_SET)); + else + EPWM_WRITE2(sc, EPWM_AQCTLB, + (AQCTL_ZRO_CLEAR | AQCTL_CBU_SET)); + } else { + sc->sc_channels[channel].inverted = false; + if (channel == 0) + EPWM_WRITE2(sc, EPWM_AQCTLA, + (AQCTL_ZRO_SET | AQCTL_CAU_CLEAR)); + else + EPWM_WRITE2(sc, EPWM_AQCTLB, + (AQCTL_ZRO_SET | AQCTL_CBU_CLEAR)); + } + PWM_UNLOCK(sc); + + return (0); +} + +static int +am335x_ehrpwm_channel_get_flags(device_t dev, u_int channel, + uint32_t *flags) +{ + struct am335x_ehrpwm_softc *sc; + if (channel >= NUM_CHANNELS) + return (EINVAL); + + sc = device_get_softc(dev); + + if (sc->sc_channels[channel].inverted == true) + *flags = PWM_POLARITY_INVERTED; + else + *flags = 0; + + return (0); +} + + static int am335x_ehrpwm_channel_enable(device_t dev, u_int channel, bool enable) { @@ -380,7 +457,7 @@ static int am335x_ehrpwm_attach(device_t dev) { struct am335x_ehrpwm_softc *sc; - uint32_t reg; + uint16_t reg; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -394,7 +471,7 @@ am335x_ehrpwm_attach(device_t dev) goto fail; } - /* CONFIGURE EPWM1 */ + /* CONFIGURE EPWM */ reg = EPWM_READ2(sc, EPWM_TBCTL); reg &= ~(TBCTL_CLKDIV_MASK | TBCTL_HSPCLKDIV_MASK); EPWM_WRITE2(sc, EPWM_TBCTL, reg); @@ -403,17 +480,40 @@ am335x_ehrpwm_attach(device_t dev) EPWM_WRITE2(sc, EPWM_CMPA, 0); EPWM_WRITE2(sc, EPWM_CMPB, 0); + /* Action-Qualifier 15.2.2.5 */ EPWM_WRITE2(sc, EPWM_AQCTLA, (AQCTL_ZRO_SET | AQCTL_CAU_CLEAR)); EPWM_WRITE2(sc, EPWM_AQCTLB, (AQCTL_ZRO_SET | AQCTL_CBU_CLEAR)); + /* Dead band 15.2.2.6 */ + reg = EPWM_READ2(sc, EPWM_DBCTL); + reg &= ~DBCTL_MASK; + reg |= DBCTL_BYPASS; + EPWM_WRITE2(sc, EPWM_DBCTL, reg); + + /* PWM-chopper described in 15.2.2.7 */ + /* Acc. TRM used in pulse transformerbased gate drivers + * to control the power switching-elements + */ + reg = EPWM_READ2(sc, EPWM_PCCTL); + reg &= ~PCCTL_CHPEN_MASK; + reg |= PCCTL_CHPEN_DISABLE; + EPWM_WRITE2(sc, EPWM_PCCTL, PCCTL_CHPEN_DISABLE); + + /* Trip zone are described in 15.2.2.8. + * Essential its used to detect faults and can be configured + * to react on such faults.. + */ + /* disable TZn as one-shot / CVC trip source 15.2.4.18 */ + EPWM_WRITE2(sc, EPWM_TZSEL, 0x0); + /* reg described in 15.2.4.19 */ + EPWM_WRITE2(sc, EPWM_TZCTL, 0xf); + reg = EPWM_READ2(sc, EPWM_TZFLG); + /* START EPWM */ reg &= ~TBCTL_CTRMODE_MASK; reg |= TBCTL_CTRMODE_UP | TBCTL_FREERUN; EPWM_WRITE2(sc, EPWM_TBCTL, reg); - EPWM_WRITE2(sc, EPWM_TZCTL, 0xf); - reg = EPWM_READ2(sc, EPWM_TZFLG); - if ((sc->sc_busdev = device_add_child(dev, "pwmbus", -1)) == NULL) { device_printf(dev, "Cannot add child pwmbus\n"); // This driver can still do things even without the bus child. @@ -480,6 +580,8 @@ static device_method_t am335x_ehrpwm_methods[] = { DEVMETHOD(pwmbus_channel_count, am335x_ehrpwm_channel_count), DEVMETHOD(pwmbus_channel_config, am335x_ehrpwm_channel_config), DEVMETHOD(pwmbus_channel_get_config, am335x_ehrpwm_channel_get_config), + DEVMETHOD(pwmbus_channel_set_flags, am335x_ehrpwm_channel_set_flags), + DEVMETHOD(pwmbus_channel_get_flags, am335x_ehrpwm_channel_get_flags), DEVMETHOD(pwmbus_channel_enable, am335x_ehrpwm_channel_enable), DEVMETHOD(pwmbus_channel_is_enabled, am335x_ehrpwm_channel_is_enabled), From owner-dev-commits-src-main@freebsd.org Sat Jun 12 09:15:18 2021 Return-Path: Delivered-To: dev-commits-src-main@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 7729C648085; Sat, 12 Jun 2021 09:15:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2BrQ2tVDz4Yj3; Sat, 12 Jun 2021 09:15:18 +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 4B0043A62; Sat, 12 Jun 2021 09:15:18 +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 15C9FIS4039382; Sat, 12 Jun 2021 09:15:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15C9FIA3039381; Sat, 12 Jun 2021 09:15:18 GMT (envelope-from git) Date: Sat, 12 Jun 2021 09:15:18 GMT Message-Id: <202106120915.15C9FIA3039381@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: 345077ccd521 - main - Remove an(4) leftover from conf/NOTES 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: 345077ccd52193591a1bad91fef3583f7129345d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2021 09:15:18 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=345077ccd52193591a1bad91fef3583f7129345d commit 345077ccd52193591a1bad91fef3583f7129345d Author: Mateusz Guzik AuthorDate: 2021-06-12 08:48:41 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-12 08:58:11 +0000 Remove an(4) leftover from conf/NOTES Unbreaks LINT kernels. --- sys/conf/NOTES | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 0d9a64a88b0f..40063c09382f 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1821,8 +1821,6 @@ device tdkphy # TDK 89Q2120 device truephy # LSI TruePHY device xmphy # XaQti XMAC II -# an: Aironet 4500/4800 802.11 wireless adapters. Supports the PCMCIA, -# PCI and ISA varieties. # ae: Support for gigabit ethernet adapters based on the Attansic/Atheros # L2 PCI-Express FastEthernet controllers. # age: Support for gigabit ethernet adapters based on the Attansic/Atheros @@ -1928,10 +1926,6 @@ device xmphy # XaQti XMAC II # in Dell Latitude laptop docking stations. # Also supported: 3Com 3c980(C)-TX, 3Com 3cSOHO100-TX, 3Com 3c450-TX -# Order for ISA devices is important here - -device an - # PCI Ethernet NICs that use the common MII bus controller code. device ae # Attansic/Atheros L2 FastEthernet device age # Attansic/Atheros L1 Gigabit Ethernet From owner-dev-commits-src-main@freebsd.org Sun Jun 13 02:45:19 2021 Return-Path: Delivered-To: dev-commits-src-main@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 E000A655226; Sun, 13 Jun 2021 02:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2f7z5lVGz4mjw; Sun, 13 Jun 2021 02:45:19 +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 AD31B193E3; Sun, 13 Jun 2021 02:45: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 15D2jJAl031932; Sun, 13 Jun 2021 02:45:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D2jJMH031931; Sun, 13 Jun 2021 02:45:19 GMT (envelope-from git) Date: Sun, 13 Jun 2021 02:45:19 GMT Message-Id: <202106130245.15D2jJMH031931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 3ff01b231dfa - main - zfs: merge openzfs/zfs@afa7b3484 (master) into main MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ff01b231dfa83d518854c63e7c9cd1debd1139e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 02:45:19 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=3ff01b231dfa83d518854c63e7c9cd1debd1139e commit 3ff01b231dfa83d518854c63e7c9cd1debd1139e Merge: 345077ccd521 afa7b3484556 Author: Martin Matuska AuthorDate: 2021-06-13 02:03:58 +0000 Commit: Martin Matuska CommitDate: 2021-06-13 02:38:47 +0000 zfs: merge openzfs/zfs@afa7b3484 (master) into main Notable upstream pull request merges: #12149: Multiple man-pages: Move to appropriate section #12158: Re-embed multilist_t storage #12191: Convert non-libzpool libraries to -fvisibility=hidden #12196: Unify manpage makefiles, move pages to better sexions, ... #12210: libzutil: import filtering optimisation #12212: Remove pool io kstats Obtained from: OpenZFS OpenZFS commit: afa7b3484556d3ae610a34582ce5ebd2c3e27bba ObsoleteFiles.inc | 10 + cddl/sbin/zfs/Makefile | 5 +- cddl/sbin/zpool/Makefile | 13 +- .../.github/workflows/zfs-tests-functional.yml | 3 +- .../openzfs/.github/workflows/zfs-tests-sanity.yml | 3 +- sys/contrib/openzfs/.github/workflows/zloop.yml | 4 +- sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 3 +- sys/contrib/openzfs/cmd/zed/zed.d/Makefile.am | 3 + sys/contrib/openzfs/cmd/zed/zed.d/all-debug.sh | 16 +- sys/contrib/openzfs/cmd/zed/zed.d/all-syslog.sh | 1 + .../zed/zed.d/history_event-zfs-list-cacher.sh.in | 19 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 2 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 38 +- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 6 +- .../ZFS-pool-latency-heatmaps-influxdb.json | 4 +- sys/contrib/openzfs/config/Rules.am | 3 + sys/contrib/openzfs/config/always-pyzfs.m4 | 15 + sys/contrib/openzfs/config/ax_python_devel.m4 | 33 +- sys/contrib/openzfs/configure.ac | 3 - .../openzfs/contrib/dracut/90zfs/.gitignore | 13 +- .../openzfs/contrib/dracut/90zfs/Makefile.am | 3 +- .../dracut/90zfs/import-opts-generator.sh.in | 5 + .../contrib/dracut/90zfs/module-setup.sh.in | 27 +- .../etc/systemd/system/zfs-import-cache.service.in | 2 +- .../etc/systemd/system/zfs-import-scan.service.in | 2 +- sys/contrib/openzfs/include/libnvpair.h | 37 +- sys/contrib/openzfs/include/libzfs_core.h | 130 +- sys/contrib/openzfs/include/libzfsbootenv.h | 20 +- sys/contrib/openzfs/include/libzutil.h | 3 + .../openzfs/include/os/freebsd/spl/sys/kstat.h | 4 - .../openzfs/include/os/linux/spl/sys/kstat.h | 4 - sys/contrib/openzfs/include/sys/arc_impl.h | 12 +- sys/contrib/openzfs/include/sys/avl.h | 36 +- sys/contrib/openzfs/include/sys/avl_impl.h | 5 +- sys/contrib/openzfs/include/sys/dmu_objset.h | 4 +- sys/contrib/openzfs/include/sys/efi_partition.h | 20 +- sys/contrib/openzfs/include/sys/metaslab_impl.h | 2 +- sys/contrib/openzfs/include/sys/multilist.h | 3 +- sys/contrib/openzfs/include/sys/nvpair.h | 443 ++- sys/contrib/openzfs/include/sys/spa.h | 1 - sys/contrib/openzfs/include/sys/zfs_context.h | 6 - sys/contrib/openzfs/include/thread_pool.h | 36 +- sys/contrib/openzfs/lib/libavl/Makefile.am | 1 + sys/contrib/openzfs/lib/libefi/Makefile.am | 1 + sys/contrib/openzfs/lib/libefi/rdwr_efi.c | 88 - sys/contrib/openzfs/lib/libnvpair/Makefile.am | 1 + sys/contrib/openzfs/lib/libnvpair/libnvpair.abi | 2468 ++++++------ sys/contrib/openzfs/lib/libshare/Makefile.am | 2 + sys/contrib/openzfs/lib/libshare/nfs.c | 2 +- sys/contrib/openzfs/lib/libshare/os/freebsd/nfs.c | 2 +- sys/contrib/openzfs/lib/libshare/os/linux/nfs.c | 2 +- sys/contrib/openzfs/lib/libspl/include/libshare.h | 14 +- sys/contrib/openzfs/lib/libspl/include/sys/kstat.h | 6 - sys/contrib/openzfs/lib/libtpool/Makefile.am | 2 + sys/contrib/openzfs/lib/libzfs/libzfs.abi | 183 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 1 + sys/contrib/openzfs/lib/libzfs_core/Makefile.am | 2 + .../openzfs/lib/libzfs_core/libzfs_core.abi | 3976 ++++++++++---------- sys/contrib/openzfs/lib/libzfsbootenv/Makefile.am | 2 + sys/contrib/openzfs/lib/libzpool/kernel.c | 48 +- sys/contrib/openzfs/lib/libzutil/Makefile.am | 1 + .../lib/libzutil/os/freebsd/zutil_import_os.c | 2 +- .../lib/libzutil/os/linux/zutil_import_os.c | 58 +- .../openzfs/lib/libzutil/zutil_device_path.c | 16 + sys/contrib/openzfs/lib/libzutil/zutil_import.c | 52 +- sys/contrib/openzfs/man/Makefile.am | 118 +- sys/contrib/openzfs/man/man1/Makefile.am | 12 - sys/contrib/openzfs/man/man1/arcstat.1 | 16 +- sys/contrib/openzfs/man/man1/cstyle.1 | 21 +- sys/contrib/openzfs/man/man1/raidz_test.1 | 28 +- sys/contrib/openzfs/man/man1/zhack.1 | 10 +- sys/contrib/openzfs/man/man1/ztest.1 | 2 +- .../{man5/spl-module-parameters.5 => man4/spl.4} | 5 +- .../{man5/zfs-module-parameters.5 => man4/zfs.4} | 7 +- sys/contrib/openzfs/man/man5/Makefile.am | 16 - sys/contrib/openzfs/man/man5/vdev_id.conf.5 | 38 +- sys/contrib/openzfs/man/man5/zfs-events.5 | 448 --- .../man/{man8/zfsconcepts.8 => man7/zfsconcepts.7} | 2 +- .../man/{man8/zfsprops.8 => man7/zfsprops.7} | 22 +- .../zpool-features.5 => man7/zpool-features.7} | 4 +- .../{man8/zpoolconcepts.8 => man7/zpoolconcepts.7} | 4 +- .../man/{man8/zpoolprops.8 => man7/zpoolprops.7} | 14 +- sys/contrib/openzfs/man/man8/Makefile.am | 102 - sys/contrib/openzfs/man/man8/fsck.zfs.8 | 8 +- sys/contrib/openzfs/man/man8/mount.zfs.8 | 2 +- sys/contrib/openzfs/man/man8/zed.8.in | 7 +- sys/contrib/openzfs/man/man8/zfs-bookmark.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-clone.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-create.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-jail.8 | 4 +- sys/contrib/openzfs/man/man8/zfs-list.8 | 8 +- sys/contrib/openzfs/man/man8/zfs-load-key.8 | 4 +- .../openzfs/man/man8/zfs-mount-generator.8.in | 4 +- sys/contrib/openzfs/man/man8/zfs-mount.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-receive.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-send.8 | 8 +- sys/contrib/openzfs/man/man8/zfs-set.8 | 12 +- sys/contrib/openzfs/man/man8/zfs-share.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-snapshot.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-upgrade.8 | 2 +- sys/contrib/openzfs/man/man8/zfs-userspace.8 | 4 +- sys/contrib/openzfs/man/man8/zfs.8 | 10 +- sys/contrib/openzfs/man/man8/zgenhostid.8 | 62 +- sys/contrib/openzfs/man/man8/zpool-add.8 | 4 +- sys/contrib/openzfs/man/man8/zpool-attach.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-create.8 | 14 +- sys/contrib/openzfs/man/man8/zpool-events.8 | 422 ++- sys/contrib/openzfs/man/man8/zpool-get.8 | 10 +- sys/contrib/openzfs/man/man8/zpool-import.8 | 4 +- sys/contrib/openzfs/man/man8/zpool-list.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-remove.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-replace.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-split.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-status.8 | 2 +- sys/contrib/openzfs/man/man8/zpool-sync.8 | 4 +- sys/contrib/openzfs/man/man8/zpool-trim.8 | 4 +- sys/contrib/openzfs/man/man8/zpool-upgrade.8 | 12 +- sys/contrib/openzfs/man/man8/zpool.8 | 21 +- sys/contrib/openzfs/man/man8/zpool_influxdb.8 | 4 +- .../openzfs/module/os/freebsd/spl/spl_kstat.c | 62 - .../openzfs/module/os/linux/spl/spl-kstat.c | 66 - .../openzfs/module/os/linux/zfs/zfs_znode.c | 15 +- sys/contrib/openzfs/module/zfs/arc.c | 86 +- sys/contrib/openzfs/module/zfs/dbuf.c | 20 +- sys/contrib/openzfs/module/zfs/dmu_objset.c | 30 +- sys/contrib/openzfs/module/zfs/dnode.c | 2 +- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 3 +- sys/contrib/openzfs/module/zfs/dsl_pool.c | 3 +- sys/contrib/openzfs/module/zfs/metaslab.c | 24 +- sys/contrib/openzfs/module/zfs/multilist.c | 14 +- sys/contrib/openzfs/module/zfs/spa_stats.c | 50 - sys/contrib/openzfs/module/zfs/vdev_queue.c | 47 - sys/contrib/openzfs/rpm/generic/zfs-dkms.spec.in | 7 + sys/contrib/openzfs/rpm/generic/zfs-kmod.spec.in | 7 + sys/contrib/openzfs/rpm/generic/zfs.spec.in | 12 + sys/contrib/openzfs/scripts/commitcheck.sh | 12 +- sys/contrib/openzfs/scripts/make_gitrev.sh | 2 +- sys/contrib/openzfs/scripts/man-dates.sh | 2 +- sys/contrib/openzfs/scripts/zol2zfs-patch.sed | 2 +- .../functional/cli_root/zfs_destroy/Makefile.am | 1 + .../zfs-tests/tests/functional/ctime/Makefile.am | 2 + .../tests/zfs-tests/tests/functional/ctime/ctime.c | 13 +- .../tests/functional/l2arc/l2arc_mfuonly_pos.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 +- 145 files changed, 4822 insertions(+), 5129 deletions(-) diff --cc ObsoleteFiles.inc index df713cfd1fb0,000000000000..1e47821fe696 mode 100644,000000..100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@@ -1,15039 -1,0 +1,15049 @@@ +# +# $FreeBSD$ +# +# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and +# directories (OLD_DIRS) which should get removed at an update. Recently +# removed entries first (with the date as a comment). Dynamic libraries are +# special cased (OLD_LIBS). Static libraries or the generic links to +# the dynamic libraries (lib*.so) should (if you don't know why to make an +# exception, make this a "must") be viewed as normal files (OLD_FILES). +# +# In case of a complete directory hierarchy the sorting is in depth first +# order. +# +# Files that are installed or removed depending on some build option +# are to be listed in /usr/src/tools/build/mk/OptionalObsoleteFiles.inc +# instead of in this file. +# +# Before you commit changes to this file please check if any entries in +# tools/build/mk/OptionalObsoleteFiles.inc can be removed. The following +# command tells which files are listed more than once regardless of some +# architecture specific conditionals, so you can not blindly trust the +# output: +# ( grep '+=' /usr/src/ObsoleteFiles.inc | sort -u ; \ +# grep '+=' /usr/src/tools/build/mk/OptionalObsoleteFiles.inc | sort -u) | \ +# sort | uniq -d +# +# To find regular duplicates not dependent on optional components, you can +# also use something that will not give you false positives, e.g.: +# for t in `make -V TARGETS universe`; do +# __MAKE_CONF=/dev/null make -f Makefile.inc1 TARGET=$t \ +# -V OLD_FILES -V OLD_LIBS -V OLD_DIRS check-old | \ +# xargs -n1 | sort | uniq -d; +# done +# +# For optional components, you can use the following to see if some entries +# in OptionalObsoleteFiles.inc have been obsoleted by ObsoleteFiles.inc +# for o in tools/build/options/WITH*; do +# __MAKE_CONF=/dev/null make -f Makefile.inc1 -D${o##*/} \ +# -V OLD_FILES -V OLD_LIBS -V OLD_DIRS check-old | \ +# xargs -n1 | sort | uniq -d; +# done + ++# 20210613: Rename OpenZFS manual pages ++OLD_FILES+=usr/share/man/man5/spl-module-parameters.5.gz ++OLD_FILES+=usr/share/man/man5/zfs-events.5.gz ++OLD_FILES+=usr/share/man/man5/zfs-module-parameters.5.gz ++OLD_FILES+=usr/share/man/man8/zfsconcepts.8 ++OLD_FILES+=usr/share/man/man8/zfsprops.8 ++OLD_FILES+=usr/share/man/man5/zpool-features.5.gz ++OLD_FILES+=usr/share/man/man8/zpoolconcepts.8 ++OLD_FILES+=usr/share/man/man8/zpoolprops.8 ++ +# 20210611: Remove svn and svnlite +OLD_FILES+=usr/bin/svn +OLD_FILES+=usr/bin/svnadmin +OLD_FILES+=usr/bin/svnbench +OLD_FILES+=usr/bin/svndumpfilter +OLD_FILES+=usr/bin/svnfsfs +OLD_FILES+=usr/bin/svnlite +OLD_FILES+=usr/bin/svnliteadmin +OLD_FILES+=usr/bin/svnlitebench +OLD_FILES+=usr/bin/svnlitedumpfilter +OLD_FILES+=usr/bin/svnlitefsfs +OLD_FILES+=usr/bin/svnlitelook +OLD_FILES+=usr/bin/svnlitemucc +OLD_FILES+=usr/bin/svnliterdump +OLD_FILES+=usr/bin/svnliteserve +OLD_FILES+=usr/bin/svnlitesync +OLD_FILES+=usr/bin/svnliteversion +OLD_FILES+=usr/bin/svnlook +OLD_FILES+=usr/bin/svnmucc +OLD_FILES+=usr/bin/svnrdump +OLD_FILES+=usr/bin/svnserve +OLD_FILES+=usr/bin/svnsync +OLD_FILES+=usr/bin/svnversion +OLD_FILES+=usr/share/man/man1/svnlite.1.gz + +# 20210607: remove ancontrol(8) related programs +OLD_FILES+=usr/sbin/ancontrol +OLD_FILES+=usr/share/man/man8/ancontrol.8.gz + +# 20210607: remove an(4) +OLD_FILES+=usr/include/dev/an/if_aironet_ieee.h +OLD_FILES+=usr/include/dev/an/if_anreg.h +OLD_FILES+=usr/share/man/man4/an.4.gz + +# 20210426: remove unused libexec/rc.d/addswap +OLD_FILES+=etc/rc.d/addswap + +# 20210413: Remove pfctlinput2 +OLD_FILES+=usr/share/man/man9/pfctlinput2.9.gz + +# 20210412: Remove kernel asymmetric crypto +OLD_FILES+=usr/share/man/man9/crypto_asym.9.gz +OLD_FILES+=usr/share/man/man9/crypto_kdispatch.9.gz +OLD_FILES+=usr/share/man/man9/crypto_kdone.9.gz +OLD_FILES+=usr/share/man/man9/crypto_kregister.9.gz +OLD_FILES+=usr/share/man/man9/CRYPTODEV_KPROCESS.9.gz + +# 20210410: remove unused libexec/rc.d/archdep +OLD_FILES+=etc/rc.d/archdep + +# 20210408: remove tcp_hostcache.h +OLD_FILES+=usr/include/netinet/tcp_hostcache.h + +# 20210403: remove kgmon(8) +OLD_FILES+=usr/sbin/kgmon +OLD_FILES+=usr/share/man/man8/kgmon.8.gz + +# 20210401: remove bt(4) man page +OLD_FILES+=usr/share/man/man4/bt.4.gz + +# 20210322: retire mn(4) sync serial driver +OLD_FILES+=usr/share/man/man4/if_mn.4.gz +OLD_FILES+=usr/share/man/man4/mn.4.gz + +# 20210318: remove the terminfo database +OLD_FILES+=usr/share/terminfo/1/1178 +OLD_FILES+=usr/share/terminfo/1/1730-lm +OLD_DIRS+=usr/share/terminfo/1 +OLD_FILES+=usr/share/terminfo/2/2621 +OLD_FILES+=usr/share/terminfo/2/2621-wl +OLD_FILES+=usr/share/terminfo/2/2621A +OLD_FILES+=usr/share/terminfo/2/2621a +OLD_DIRS+=usr/share/terminfo/2/ +OLD_FILES+=usr/share/terminfo/3/386at +OLD_FILES+=usr/share/terminfo/3/3b1 +OLD_DIRS+=usr/share/terminfo/3/ +OLD_FILES+=usr/share/terminfo/4/4025ex +OLD_FILES+=usr/share/terminfo/4/4027ex +OLD_FILES+=usr/share/terminfo/4/4410-w +OLD_DIRS+=usr/share/terminfo/4/ +OLD_FILES+=usr/share/terminfo/5/5051 +OLD_FILES+=usr/share/terminfo/5/5410-w +OLD_FILES+=usr/share/terminfo/5/5620 +OLD_FILES+=usr/share/terminfo/5/5630-24 +OLD_FILES+=usr/share/terminfo/5/5630DMD-24 +OLD_DIRS+=usr/share/terminfo/5/ +OLD_FILES+=usr/share/terminfo/6/6053 +OLD_FILES+=usr/share/terminfo/6/6053-dg +OLD_FILES+=usr/share/terminfo/6/605x +OLD_FILES+=usr/share/terminfo/6/605x-dg +OLD_FILES+=usr/share/terminfo/6/630-lm +OLD_FILES+=usr/share/terminfo/6/630MTG-24 +OLD_DIRS+=usr/share/terminfo/6/ +OLD_FILES+=usr/share/terminfo/7/730MTG-24 +OLD_FILES+=usr/share/terminfo/7/730MTG-41 +OLD_FILES+=usr/share/terminfo/7/730MTG-41r +OLD_FILES+=usr/share/terminfo/7/730MTGr +OLD_FILES+=usr/share/terminfo/7/730MTGr-24 +OLD_DIRS+=usr/share/terminfo/7/ +OLD_FILES+=usr/share/terminfo/8/8510 +OLD_DIRS+=usr/share/terminfo/8/ +OLD_FILES+=usr/share/terminfo/9/955-hb +OLD_FILES+=usr/share/terminfo/9/955-w +OLD_FILES+=usr/share/terminfo/9/9term +OLD_DIRS+=usr/share/terminfo/9/ +OLD_FILES+=usr/share/terminfo/A/Apple_Terminal +OLD_DIRS+=usr/share/terminfo/A/ +OLD_FILES+=usr/share/terminfo/E/Eterm +OLD_FILES+=usr/share/terminfo/E/Eterm-256color +OLD_FILES+=usr/share/terminfo/E/Eterm-88color +OLD_FILES+=usr/share/terminfo/E/Eterm-color +OLD_DIRS+=usr/share/terminfo/E/ +OLD_FILES+=usr/share/terminfo/L/LFT-PC850 +OLD_DIRS+=usr/share/terminfo/L/ +OLD_FILES+=usr/share/terminfo/M/MtxOrb +OLD_FILES+=usr/share/terminfo/M/MtxOrb162 +OLD_FILES+=usr/share/terminfo/M/MtxOrb204 +OLD_DIRS+=usr/share/terminfo/M/ +OLD_FILES+=usr/share/terminfo/N/NCR260VT300WPP +OLD_FILES+=usr/share/terminfo/N/NCRVT100WPP +OLD_DIRS+=usr/share/terminfo/N/ +OLD_FILES+=usr/share/terminfo/P/P12 +OLD_FILES+=usr/share/terminfo/P/P12-M +OLD_FILES+=usr/share/terminfo/P/P12-M-W +OLD_FILES+=usr/share/terminfo/P/P12-W +OLD_FILES+=usr/share/terminfo/P/P14 +OLD_FILES+=usr/share/terminfo/P/P14-M +OLD_FILES+=usr/share/terminfo/P/P14-M-W +OLD_FILES+=usr/share/terminfo/P/P14-W +OLD_FILES+=usr/share/terminfo/P/P4 +OLD_FILES+=usr/share/terminfo/P/P5 +OLD_FILES+=usr/share/terminfo/P/P7 +OLD_FILES+=usr/share/terminfo/P/P8 +OLD_FILES+=usr/share/terminfo/P/P8-W +OLD_FILES+=usr/share/terminfo/P/P9 +OLD_FILES+=usr/share/terminfo/P/P9-8 +OLD_FILES+=usr/share/terminfo/P/P9-8-W +OLD_FILES+=usr/share/terminfo/P/P9-W +OLD_DIRS+=usr/share/terminfo/P/ +OLD_FILES+=usr/share/terminfo/Q/Q306-8-pc +OLD_FILES+=usr/share/terminfo/Q/Q310-vip-H +OLD_FILES+=usr/share/terminfo/Q/Q310-vip-H-am +OLD_FILES+=usr/share/terminfo/Q/Q310-vip-Hw +OLD_FILES+=usr/share/terminfo/Q/Q310-vip-w +OLD_FILES+=usr/share/terminfo/Q/Q310-vip-w-am +OLD_DIRS+=usr/share/terminfo/Q/ +OLD_FILES+=usr/share/terminfo/X/X-hpterm +OLD_DIRS+=usr/share/terminfo/X/ +OLD_FILES+=usr/share/terminfo/a/a210 +OLD_FILES+=usr/share/terminfo/a/a80 +OLD_FILES+=usr/share/terminfo/a/a980 +OLD_FILES+=usr/share/terminfo/a/aa4080 +OLD_FILES+=usr/share/terminfo/a/aaa +OLD_FILES+=usr/share/terminfo/a/aaa+dec +OLD_FILES+=usr/share/terminfo/a/aaa+rv +OLD_FILES+=usr/share/terminfo/a/aaa+unk +OLD_FILES+=usr/share/terminfo/a/aaa-18 +OLD_FILES+=usr/share/terminfo/a/aaa-18-rv +OLD_FILES+=usr/share/terminfo/a/aaa-20 +OLD_FILES+=usr/share/terminfo/a/aaa-22 +OLD_FILES+=usr/share/terminfo/a/aaa-24 +OLD_FILES+=usr/share/terminfo/a/aaa-24-rv +OLD_FILES+=usr/share/terminfo/a/aaa-26 +OLD_FILES+=usr/share/terminfo/a/aaa-28 +OLD_FILES+=usr/share/terminfo/a/aaa-30 +OLD_FILES+=usr/share/terminfo/a/aaa-30-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-30-rv +OLD_FILES+=usr/share/terminfo/a/aaa-30-rv-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-30-s +OLD_FILES+=usr/share/terminfo/a/aaa-30-s-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-30-s-rv +OLD_FILES+=usr/share/terminfo/a/aaa-30-s-rv-ct +OLD_FILES+=usr/share/terminfo/a/aaa-36 +OLD_FILES+=usr/share/terminfo/a/aaa-36-rv +OLD_FILES+=usr/share/terminfo/a/aaa-40 +OLD_FILES+=usr/share/terminfo/a/aaa-40-rv +OLD_FILES+=usr/share/terminfo/a/aaa-48 +OLD_FILES+=usr/share/terminfo/a/aaa-48-rv +OLD_FILES+=usr/share/terminfo/a/aaa-60 +OLD_FILES+=usr/share/terminfo/a/aaa-60-dec-rv +OLD_FILES+=usr/share/terminfo/a/aaa-60-rv +OLD_FILES+=usr/share/terminfo/a/aaa-60-s +OLD_FILES+=usr/share/terminfo/a/aaa-60-s-rv +OLD_FILES+=usr/share/terminfo/a/aaa-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-db +OLD_FILES+=usr/share/terminfo/a/aaa-rv +OLD_FILES+=usr/share/terminfo/a/aaa-rv-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-rv-unk +OLD_FILES+=usr/share/terminfo/a/aaa-s +OLD_FILES+=usr/share/terminfo/a/aaa-s-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-s-rv +OLD_FILES+=usr/share/terminfo/a/aaa-s-rv-ctxt +OLD_FILES+=usr/share/terminfo/a/aaa-unk +OLD_FILES+=usr/share/terminfo/a/aas1901 +OLD_FILES+=usr/share/terminfo/a/abm80 +OLD_FILES+=usr/share/terminfo/a/abm85 +OLD_FILES+=usr/share/terminfo/a/abm85e +OLD_FILES+=usr/share/terminfo/a/abm85h +OLD_FILES+=usr/share/terminfo/a/abm85h-old +OLD_FILES+=usr/share/terminfo/a/absolute +OLD_FILES+=usr/share/terminfo/a/act4 +OLD_FILES+=usr/share/terminfo/a/act5 +OLD_FILES+=usr/share/terminfo/a/addrinfo +OLD_FILES+=usr/share/terminfo/a/adds200 +OLD_FILES+=usr/share/terminfo/a/adds980 +OLD_FILES+=usr/share/terminfo/a/addsviewpoint +OLD_FILES+=usr/share/terminfo/a/addsvp60 +OLD_FILES+=usr/share/terminfo/a/adm+sgr +OLD_FILES+=usr/share/terminfo/a/adm1 +OLD_FILES+=usr/share/terminfo/a/adm11 +OLD_FILES+=usr/share/terminfo/a/adm1178 +OLD_FILES+=usr/share/terminfo/a/adm12 +OLD_FILES+=usr/share/terminfo/a/adm1a +OLD_FILES+=usr/share/terminfo/a/adm2 +OLD_FILES+=usr/share/terminfo/a/adm20 +OLD_FILES+=usr/share/terminfo/a/adm21 +OLD_FILES+=usr/share/terminfo/a/adm22 +OLD_FILES+=usr/share/terminfo/a/adm3 +OLD_FILES+=usr/share/terminfo/a/adm31 +OLD_FILES+=usr/share/terminfo/a/adm31-old +OLD_FILES+=usr/share/terminfo/a/adm36 +OLD_FILES+=usr/share/terminfo/a/adm3a +OLD_FILES+=usr/share/terminfo/a/adm3a+ +OLD_FILES+=usr/share/terminfo/a/adm42 +OLD_FILES+=usr/share/terminfo/a/adm42-ns +OLD_FILES+=usr/share/terminfo/a/adm5 +OLD_FILES+=usr/share/terminfo/a/aepro +OLD_FILES+=usr/share/terminfo/a/aixterm +OLD_FILES+=usr/share/terminfo/a/aixterm-16color +OLD_FILES+=usr/share/terminfo/a/aixterm-m +OLD_FILES+=usr/share/terminfo/a/aixterm-m-old +OLD_FILES+=usr/share/terminfo/a/aj +OLD_FILES+=usr/share/terminfo/a/aj510 +OLD_FILES+=usr/share/terminfo/a/aj830 +OLD_FILES+=usr/share/terminfo/a/aj832 +OLD_FILES+=usr/share/terminfo/a/alacritty +OLD_FILES+=usr/share/terminfo/a/alacritty+common +OLD_FILES+=usr/share/terminfo/a/alacritty-direct +OLD_FILES+=usr/share/terminfo/a/alt2 +OLD_FILES+=usr/share/terminfo/a/alt3 +OLD_FILES+=usr/share/terminfo/a/alt4 +OLD_FILES+=usr/share/terminfo/a/alt5 +OLD_FILES+=usr/share/terminfo/a/alt7 +OLD_FILES+=usr/share/terminfo/a/alt7pc +OLD_FILES+=usr/share/terminfo/a/alto-h19 +OLD_FILES+=usr/share/terminfo/a/alto-heath +OLD_FILES+=usr/share/terminfo/a/altoh19 +OLD_FILES+=usr/share/terminfo/a/altoheath +OLD_FILES+=usr/share/terminfo/a/altos-2 +OLD_FILES+=usr/share/terminfo/a/altos-3 +OLD_FILES+=usr/share/terminfo/a/altos-4 +OLD_FILES+=usr/share/terminfo/a/altos-5 +OLD_FILES+=usr/share/terminfo/a/altos2 +OLD_FILES+=usr/share/terminfo/a/altos3 +OLD_FILES+=usr/share/terminfo/a/altos4 +OLD_FILES+=usr/share/terminfo/a/altos5 +OLD_FILES+=usr/share/terminfo/a/altos7 +OLD_FILES+=usr/share/terminfo/a/altos7pc +OLD_FILES+=usr/share/terminfo/a/ambas +OLD_FILES+=usr/share/terminfo/a/ambassador +OLD_FILES+=usr/share/terminfo/a/amiga +OLD_FILES+=usr/share/terminfo/a/amiga-8bit +OLD_FILES+=usr/share/terminfo/a/amiga-h +OLD_FILES+=usr/share/terminfo/a/amiga-vnc +OLD_FILES+=usr/share/terminfo/a/amp219 +OLD_FILES+=usr/share/terminfo/a/amp219w +OLD_FILES+=usr/share/terminfo/a/ampex-219 +OLD_FILES+=usr/share/terminfo/a/ampex-219w +OLD_FILES+=usr/share/terminfo/a/ampex-232 +OLD_FILES+=usr/share/terminfo/a/ampex175 +OLD_FILES+=usr/share/terminfo/a/ampex175-b +OLD_FILES+=usr/share/terminfo/a/ampex210 +OLD_FILES+=usr/share/terminfo/a/ampex219 +OLD_FILES+=usr/share/terminfo/a/ampex219w +OLD_FILES+=usr/share/terminfo/a/ampex232 +OLD_FILES+=usr/share/terminfo/a/ampex232w +OLD_FILES+=usr/share/terminfo/a/ampex80 +OLD_FILES+=usr/share/terminfo/a/annarbor4080 +OLD_FILES+=usr/share/terminfo/a/ansi +OLD_FILES+=usr/share/terminfo/a/ansi+arrows +OLD_FILES+=usr/share/terminfo/a/ansi+csr +OLD_FILES+=usr/share/terminfo/a/ansi+cup +OLD_FILES+=usr/share/terminfo/a/ansi+enq +OLD_FILES+=usr/share/terminfo/a/ansi+erase +OLD_FILES+=usr/share/terminfo/a/ansi+idc +OLD_FILES+=usr/share/terminfo/a/ansi+idc1 +OLD_FILES+=usr/share/terminfo/a/ansi+idl +OLD_FILES+=usr/share/terminfo/a/ansi+idl1 +OLD_FILES+=usr/share/terminfo/a/ansi+inittabs +OLD_FILES+=usr/share/terminfo/a/ansi+local +OLD_FILES+=usr/share/terminfo/a/ansi+local1 +OLD_FILES+=usr/share/terminfo/a/ansi+pp +OLD_FILES+=usr/share/terminfo/a/ansi+rca +OLD_FILES+=usr/share/terminfo/a/ansi+rep +OLD_FILES+=usr/share/terminfo/a/ansi+sgr +OLD_FILES+=usr/share/terminfo/a/ansi+sgrbold +OLD_FILES+=usr/share/terminfo/a/ansi+sgrdim +OLD_FILES+=usr/share/terminfo/a/ansi+sgrso +OLD_FILES+=usr/share/terminfo/a/ansi+sgrul +OLD_FILES+=usr/share/terminfo/a/ansi+tabs +OLD_FILES+=usr/share/terminfo/a/ansi-color-2-emx +OLD_FILES+=usr/share/terminfo/a/ansi-color-3-emx +OLD_FILES+=usr/share/terminfo/a/ansi-emx +OLD_FILES+=usr/share/terminfo/a/ansi-generic +OLD_FILES+=usr/share/terminfo/a/ansi-m +OLD_FILES+=usr/share/terminfo/a/ansi-mini +OLD_FILES+=usr/share/terminfo/a/ansi-mono +OLD_FILES+=usr/share/terminfo/a/ansi-mr +OLD_FILES+=usr/share/terminfo/a/ansi-mtabs +OLD_FILES+=usr/share/terminfo/a/ansi-nt +OLD_FILES+=usr/share/terminfo/a/ansi.sys +OLD_FILES+=usr/share/terminfo/a/ansi.sys-old +OLD_FILES+=usr/share/terminfo/a/ansi.sysk +OLD_FILES+=usr/share/terminfo/a/ansi43m +OLD_FILES+=usr/share/terminfo/a/ansi77 +OLD_FILES+=usr/share/terminfo/a/ansi80x25 +OLD_FILES+=usr/share/terminfo/a/ansi80x25-mono +OLD_FILES+=usr/share/terminfo/a/ansi80x25-raw +OLD_FILES+=usr/share/terminfo/a/ansi80x30 +OLD_FILES+=usr/share/terminfo/a/ansi80x30-mono +OLD_FILES+=usr/share/terminfo/a/ansi80x43 +OLD_FILES+=usr/share/terminfo/a/ansi80x43-mono +OLD_FILES+=usr/share/terminfo/a/ansi80x50 +OLD_FILES+=usr/share/terminfo/a/ansi80x50-mono +OLD_FILES+=usr/share/terminfo/a/ansi80x60 +OLD_FILES+=usr/share/terminfo/a/ansi80x60-mono +OLD_FILES+=usr/share/terminfo/a/ansil +OLD_FILES+=usr/share/terminfo/a/ansil-mono +OLD_FILES+=usr/share/terminfo/a/ansis +OLD_FILES+=usr/share/terminfo/a/ansis-mono +OLD_FILES+=usr/share/terminfo/a/ansisysk +OLD_FILES+=usr/share/terminfo/a/ansiterm +OLD_FILES+=usr/share/terminfo/a/ansiw +OLD_FILES+=usr/share/terminfo/a/ap-vm80 +OLD_FILES+=usr/share/terminfo/a/apl +OLD_FILES+=usr/share/terminfo/a/apollo +OLD_FILES+=usr/share/terminfo/a/apollo_15P +OLD_FILES+=usr/share/terminfo/a/apollo_19L +OLD_FILES+=usr/share/terminfo/a/apollo_color +OLD_FILES+=usr/share/terminfo/a/apple-80 +OLD_FILES+=usr/share/terminfo/a/apple-ae +OLD_FILES+=usr/share/terminfo/a/apple-soroc +OLD_FILES+=usr/share/terminfo/a/apple-uterm +OLD_FILES+=usr/share/terminfo/a/apple-uterm-vb +OLD_FILES+=usr/share/terminfo/a/apple-videx +OLD_FILES+=usr/share/terminfo/a/apple-videx2 +OLD_FILES+=usr/share/terminfo/a/apple-videx3 +OLD_FILES+=usr/share/terminfo/a/apple-vm80 +OLD_FILES+=usr/share/terminfo/a/apple2e +OLD_FILES+=usr/share/terminfo/a/apple2e-p +OLD_FILES+=usr/share/terminfo/a/apple80p +OLD_FILES+=usr/share/terminfo/a/appleII +OLD_FILES+=usr/share/terminfo/a/appleIIc +OLD_FILES+=usr/share/terminfo/a/appleIIe +OLD_FILES+=usr/share/terminfo/a/appleIIgs +OLD_FILES+=usr/share/terminfo/a/arm100 +OLD_FILES+=usr/share/terminfo/a/arm100-am +OLD_FILES+=usr/share/terminfo/a/arm100-w +OLD_FILES+=usr/share/terminfo/a/arm100-wam +OLD_FILES+=usr/share/terminfo/a/at +OLD_FILES+=usr/share/terminfo/a/at-color +OLD_FILES+=usr/share/terminfo/a/at-m +OLD_FILES+=usr/share/terminfo/a/at386 +OLD_FILES+=usr/share/terminfo/a/atari +OLD_FILES+=usr/share/terminfo/a/atari-color +OLD_FILES+=usr/share/terminfo/a/atari-m +OLD_FILES+=usr/share/terminfo/a/atari-old +OLD_FILES+=usr/share/terminfo/a/atari_st +OLD_FILES+=usr/share/terminfo/a/atari_st-color +OLD_FILES+=usr/share/terminfo/a/atarist-m +OLD_FILES+=usr/share/terminfo/a/aterm +OLD_FILES+=usr/share/terminfo/a/att2300 +OLD_FILES+=usr/share/terminfo/a/att2350 +OLD_FILES+=usr/share/terminfo/a/att4410 +OLD_FILES+=usr/share/terminfo/a/att4410-w +OLD_FILES+=usr/share/terminfo/a/att4410v1 +OLD_FILES+=usr/share/terminfo/a/att4410v1-w +OLD_FILES+=usr/share/terminfo/a/att4415 +OLD_FILES+=usr/share/terminfo/a/att4415+nl +OLD_FILES+=usr/share/terminfo/a/att4415-nl +OLD_FILES+=usr/share/terminfo/a/att4415-rv +OLD_FILES+=usr/share/terminfo/a/att4415-rv-nl +OLD_FILES+=usr/share/terminfo/a/att4415-w +OLD_FILES+=usr/share/terminfo/a/att4415-w-nl +OLD_FILES+=usr/share/terminfo/a/att4415-w-rv +OLD_FILES+=usr/share/terminfo/a/att4415-w-rv-n +OLD_FILES+=usr/share/terminfo/a/att4418 +OLD_FILES+=usr/share/terminfo/a/att4418-w +OLD_FILES+=usr/share/terminfo/a/att4420 +OLD_FILES+=usr/share/terminfo/a/att4424 +OLD_FILES+=usr/share/terminfo/a/att4424-1 +OLD_FILES+=usr/share/terminfo/a/att4424m +OLD_FILES+=usr/share/terminfo/a/att4425 +OLD_FILES+=usr/share/terminfo/a/att4425-nl +OLD_FILES+=usr/share/terminfo/a/att4425-w +OLD_FILES+=usr/share/terminfo/a/att4426 +OLD_FILES+=usr/share/terminfo/a/att500 +OLD_FILES+=usr/share/terminfo/a/att505 +OLD_FILES+=usr/share/terminfo/a/att505-24 +OLD_FILES+=usr/share/terminfo/a/att510a +OLD_FILES+=usr/share/terminfo/a/att510d +OLD_FILES+=usr/share/terminfo/a/att513 +OLD_FILES+=usr/share/terminfo/a/att5310 +OLD_FILES+=usr/share/terminfo/a/att5320 +OLD_FILES+=usr/share/terminfo/a/att5410 +OLD_FILES+=usr/share/terminfo/a/att5410-w +OLD_FILES+=usr/share/terminfo/a/att5410v1 +OLD_FILES+=usr/share/terminfo/a/att5410v1-w +OLD_FILES+=usr/share/terminfo/a/att5418 +OLD_FILES+=usr/share/terminfo/a/att5418-w +OLD_FILES+=usr/share/terminfo/a/att5420 +OLD_FILES+=usr/share/terminfo/a/att5420+nl +OLD_FILES+=usr/share/terminfo/a/att5420-nl +OLD_FILES+=usr/share/terminfo/a/att5420-rv +OLD_FILES+=usr/share/terminfo/a/att5420-rv-nl +OLD_FILES+=usr/share/terminfo/a/att5420-w +OLD_FILES+=usr/share/terminfo/a/att5420-w-nl +OLD_FILES+=usr/share/terminfo/a/att5420-w-rv +OLD_FILES+=usr/share/terminfo/a/att5420-w-rv-n +OLD_FILES+=usr/share/terminfo/a/att5420_2 +OLD_FILES+=usr/share/terminfo/a/att5420_2-w +OLD_FILES+=usr/share/terminfo/a/att5425 +OLD_FILES+=usr/share/terminfo/a/att5425-nl +OLD_FILES+=usr/share/terminfo/a/att5425-w +OLD_FILES+=usr/share/terminfo/a/att5430 +OLD_FILES+=usr/share/terminfo/a/att5620 +OLD_FILES+=usr/share/terminfo/a/att5620-1 +OLD_FILES+=usr/share/terminfo/a/att5620-24 +OLD_FILES+=usr/share/terminfo/a/att5620-34 +OLD_FILES+=usr/share/terminfo/a/att5620-s +OLD_FILES+=usr/share/terminfo/a/att605 +OLD_FILES+=usr/share/terminfo/a/att605-pc +OLD_FILES+=usr/share/terminfo/a/att605-w +OLD_FILES+=usr/share/terminfo/a/att610 +OLD_FILES+=usr/share/terminfo/a/att610+cvis +OLD_FILES+=usr/share/terminfo/a/att610+cvis0 +OLD_FILES+=usr/share/terminfo/a/att610-103k +OLD_FILES+=usr/share/terminfo/a/att610-103k-w +OLD_FILES+=usr/share/terminfo/a/att610-w +OLD_FILES+=usr/share/terminfo/a/att615 +OLD_FILES+=usr/share/terminfo/a/att615-103k +OLD_FILES+=usr/share/terminfo/a/att615-103k-w +OLD_FILES+=usr/share/terminfo/a/att615-w +OLD_FILES+=usr/share/terminfo/a/att620 +OLD_FILES+=usr/share/terminfo/a/att620-103k +OLD_FILES+=usr/share/terminfo/a/att620-103k-w +OLD_FILES+=usr/share/terminfo/a/att620-w +OLD_FILES+=usr/share/terminfo/a/att630 +OLD_FILES+=usr/share/terminfo/a/att630-24 +OLD_FILES+=usr/share/terminfo/a/att6386 +OLD_FILES+=usr/share/terminfo/a/att700 +OLD_FILES+=usr/share/terminfo/a/att730 +OLD_FILES+=usr/share/terminfo/a/att730-24 +OLD_FILES+=usr/share/terminfo/a/att730-41 +OLD_FILES+=usr/share/terminfo/a/att7300 +OLD_FILES+=usr/share/terminfo/a/att730r +OLD_FILES+=usr/share/terminfo/a/att730r-24 +OLD_FILES+=usr/share/terminfo/a/att730r-41 +OLD_FILES+=usr/share/terminfo/a/avatar +OLD_FILES+=usr/share/terminfo/a/avatar0 +OLD_FILES+=usr/share/terminfo/a/avatar0+ +OLD_FILES+=usr/share/terminfo/a/avatar1 +OLD_FILES+=usr/share/terminfo/a/avt +OLD_FILES+=usr/share/terminfo/a/avt+s +OLD_FILES+=usr/share/terminfo/a/avt-ns +OLD_FILES+=usr/share/terminfo/a/avt-rv +OLD_FILES+=usr/share/terminfo/a/avt-rv-ns +OLD_FILES+=usr/share/terminfo/a/avt-rv-s +OLD_FILES+=usr/share/terminfo/a/avt-s +OLD_FILES+=usr/share/terminfo/a/avt-w +OLD_FILES+=usr/share/terminfo/a/avt-w-ns +OLD_FILES+=usr/share/terminfo/a/avt-w-rv +OLD_FILES+=usr/share/terminfo/a/avt-w-rv-ns +OLD_FILES+=usr/share/terminfo/a/avt-w-rv-s +OLD_FILES+=usr/share/terminfo/a/avt-w-s +OLD_FILES+=usr/share/terminfo/a/aws +OLD_FILES+=usr/share/terminfo/a/awsc +OLD_DIRS+=usr/share/terminfo/a/ +OLD_FILES+=usr/share/terminfo/b/b-128 +OLD_FILES+=usr/share/terminfo/b/bantam +OLD_FILES+=usr/share/terminfo/b/basic4 +OLD_FILES+=usr/share/terminfo/b/basis +OLD_FILES+=usr/share/terminfo/b/bct510a +OLD_FILES+=usr/share/terminfo/b/bct510d +OLD_FILES+=usr/share/terminfo/b/beacon +OLD_FILES+=usr/share/terminfo/b/bee +OLD_FILES+=usr/share/terminfo/b/beehive +OLD_FILES+=usr/share/terminfo/b/beehive3 +OLD_FILES+=usr/share/terminfo/b/beehive4 +OLD_FILES+=usr/share/terminfo/b/beehiveIIIm +OLD_FILES+=usr/share/terminfo/b/beterm +OLD_FILES+=usr/share/terminfo/b/bg1.25 +OLD_FILES+=usr/share/terminfo/b/bg1.25nv +OLD_FILES+=usr/share/terminfo/b/bg1.25rv +OLD_FILES+=usr/share/terminfo/b/bg2.0 +OLD_FILES+=usr/share/terminfo/b/bg2.0nv +OLD_FILES+=usr/share/terminfo/b/bg2.0rv +OLD_FILES+=usr/share/terminfo/b/bg3.10 +OLD_FILES+=usr/share/terminfo/b/bg3.10nv +OLD_FILES+=usr/share/terminfo/b/bg3.10rv +OLD_FILES+=usr/share/terminfo/b/bh3m +OLD_FILES+=usr/share/terminfo/b/bh4 +OLD_FILES+=usr/share/terminfo/b/bitgraph +OLD_FILES+=usr/share/terminfo/b/blit +OLD_FILES+=usr/share/terminfo/b/bobcat +OLD_FILES+=usr/share/terminfo/b/bq300 +OLD_FILES+=usr/share/terminfo/b/bq300-8 +OLD_FILES+=usr/share/terminfo/b/bq300-8-pc +OLD_FILES+=usr/share/terminfo/b/bq300-8-pc-rv +OLD_FILES+=usr/share/terminfo/b/bq300-8-pc-w +OLD_FILES+=usr/share/terminfo/b/bq300-8-pc-w-rv +OLD_FILES+=usr/share/terminfo/b/bq300-8rv +OLD_FILES+=usr/share/terminfo/b/bq300-8w +OLD_FILES+=usr/share/terminfo/b/bq300-pc +OLD_FILES+=usr/share/terminfo/b/bq300-pc-rv +OLD_FILES+=usr/share/terminfo/b/bq300-pc-w +OLD_FILES+=usr/share/terminfo/b/bq300-pc-w-rv +OLD_FILES+=usr/share/terminfo/b/bq300-rv +OLD_FILES+=usr/share/terminfo/b/bq300-w +OLD_FILES+=usr/share/terminfo/b/bq300-w-8rv +OLD_FILES+=usr/share/terminfo/b/bq300-w-rv +OLD_FILES+=usr/share/terminfo/b/bsdos-pc +OLD_FILES+=usr/share/terminfo/b/bsdos-pc-m +OLD_FILES+=usr/share/terminfo/b/bsdos-pc-mono +OLD_FILES+=usr/share/terminfo/b/bsdos-pc-nobold +OLD_FILES+=usr/share/terminfo/b/bsdos-ppc +OLD_FILES+=usr/share/terminfo/b/bsdos-sparc +OLD_FILES+=usr/share/terminfo/b/bterm +OLD_DIRS+=usr/share/terminfo/b/ +OLD_FILES+=usr/share/terminfo/c/c100 +OLD_FILES+=usr/share/terminfo/c/c100-1p +OLD_FILES+=usr/share/terminfo/c/c100-4p +OLD_FILES+=usr/share/terminfo/c/c100-rv +OLD_FILES+=usr/share/terminfo/c/c100-rv-4p +OLD_FILES+=usr/share/terminfo/c/c104 +OLD_FILES+=usr/share/terminfo/c/c108 +OLD_FILES+=usr/share/terminfo/c/c108-4p +OLD_FILES+=usr/share/terminfo/c/c108-8p +OLD_FILES+=usr/share/terminfo/c/c108-rv +OLD_FILES+=usr/share/terminfo/c/c108-rv-4p +OLD_FILES+=usr/share/terminfo/c/c108-rv-8p +OLD_FILES+=usr/share/terminfo/c/c108-w +OLD_FILES+=usr/share/terminfo/c/c108-w-8p +OLD_FILES+=usr/share/terminfo/c/c300 +OLD_FILES+=usr/share/terminfo/c/c301 +OLD_FILES+=usr/share/terminfo/c/c321 +OLD_FILES+=usr/share/terminfo/c/ca22851 +OLD_FILES+=usr/share/terminfo/c/cad68-2 +OLD_FILES+=usr/share/terminfo/c/cad68-3 +OLD_FILES+=usr/share/terminfo/c/cbblit +OLD_FILES+=usr/share/terminfo/c/cbunix +OLD_FILES+=usr/share/terminfo/c/cci +OLD_FILES+=usr/share/terminfo/c/cci1 +OLD_FILES+=usr/share/terminfo/c/cdc456 +OLD_FILES+=usr/share/terminfo/c/cdc721 +OLD_FILES+=usr/share/terminfo/c/cdc721-esc +OLD_FILES+=usr/share/terminfo/c/cdc721ll +OLD_FILES+=usr/share/terminfo/c/cdc752 +OLD_FILES+=usr/share/terminfo/c/cdc756 +OLD_FILES+=usr/share/terminfo/c/cg7900 +OLD_FILES+=usr/share/terminfo/c/cgc2 +OLD_FILES+=usr/share/terminfo/c/cgc3 +OLD_FILES+=usr/share/terminfo/c/chromatics +OLD_FILES+=usr/share/terminfo/c/ci8510 +OLD_FILES+=usr/share/terminfo/c/cit-80 +OLD_FILES+=usr/share/terminfo/c/cit101 +OLD_FILES+=usr/share/terminfo/c/cit101e +OLD_FILES+=usr/share/terminfo/c/cit101e-132 +OLD_FILES+=usr/share/terminfo/c/cit101e-n +OLD_FILES+=usr/share/terminfo/c/cit101e-n132 +OLD_FILES+=usr/share/terminfo/c/cit101e-rv +OLD_FILES+=usr/share/terminfo/c/cit500 +OLD_FILES+=usr/share/terminfo/c/cit80 +OLD_FILES+=usr/share/terminfo/c/citc +OLD_FILES+=usr/share/terminfo/c/citoh +OLD_FILES+=usr/share/terminfo/c/citoh-6lpi +OLD_FILES+=usr/share/terminfo/c/citoh-8lpi +OLD_FILES+=usr/share/terminfo/c/citoh-comp +OLD_FILES+=usr/share/terminfo/c/citoh-elite +OLD_FILES+=usr/share/terminfo/c/citoh-pica +OLD_FILES+=usr/share/terminfo/c/citoh-prop +OLD_FILES+=usr/share/terminfo/c/citoh-ps +OLD_FILES+=usr/share/terminfo/c/coco3 +OLD_FILES+=usr/share/terminfo/c/coherent +OLD_FILES+=usr/share/terminfo/c/color_xterm +OLD_FILES+=usr/share/terminfo/c/colorscan +OLD_FILES+=usr/share/terminfo/c/commodore +OLD_FILES+=usr/share/terminfo/c/concept +OLD_FILES+=usr/share/terminfo/c/concept-avt +OLD_FILES+=usr/share/terminfo/c/concept100 +OLD_FILES+=usr/share/terminfo/c/concept100-rv +OLD_FILES+=usr/share/terminfo/c/concept108 +OLD_FILES+=usr/share/terminfo/c/concept108-4p +OLD_FILES+=usr/share/terminfo/c/concept108-8p +OLD_FILES+=usr/share/terminfo/c/concept108-w-8 +OLD_FILES+=usr/share/terminfo/c/concept108-w8p +OLD_FILES+=usr/share/terminfo/c/concept108rv4p +OLD_FILES+=usr/share/terminfo/c/cons25 +OLD_FILES+=usr/share/terminfo/c/cons25-debian +OLD_FILES+=usr/share/terminfo/c/cons25-iso-m +OLD_FILES+=usr/share/terminfo/c/cons25-iso8859 +OLD_FILES+=usr/share/terminfo/c/cons25-koi8-r +OLD_FILES+=usr/share/terminfo/c/cons25-koi8r-m +OLD_FILES+=usr/share/terminfo/c/cons25-m +OLD_FILES+=usr/share/terminfo/c/cons25l1 +OLD_FILES+=usr/share/terminfo/c/cons25l1-m +OLD_FILES+=usr/share/terminfo/c/cons25r +OLD_FILES+=usr/share/terminfo/c/cons25r-m +OLD_FILES+=usr/share/terminfo/c/cons25w +OLD_FILES+=usr/share/terminfo/c/cons30 +OLD_FILES+=usr/share/terminfo/c/cons30-m +OLD_FILES+=usr/share/terminfo/c/cons43 +OLD_FILES+=usr/share/terminfo/c/cons43-m +OLD_FILES+=usr/share/terminfo/c/cons50 +OLD_FILES+=usr/share/terminfo/c/cons50-iso-m +OLD_FILES+=usr/share/terminfo/c/cons50-iso8859 +OLD_FILES+=usr/share/terminfo/c/cons50-koi8r +OLD_FILES+=usr/share/terminfo/c/cons50-koi8r-m +OLD_FILES+=usr/share/terminfo/c/cons50-m +OLD_FILES+=usr/share/terminfo/c/cons50l1 +OLD_FILES+=usr/share/terminfo/c/cons50l1-m +OLD_FILES+=usr/share/terminfo/c/cons50r +OLD_FILES+=usr/share/terminfo/c/cons50r-m +OLD_FILES+=usr/share/terminfo/c/cons60 +OLD_FILES+=usr/share/terminfo/c/cons60-iso +OLD_FILES+=usr/share/terminfo/c/cons60-iso-m +OLD_FILES+=usr/share/terminfo/c/cons60-koi8r +OLD_FILES+=usr/share/terminfo/c/cons60-koi8r-m +OLD_FILES+=usr/share/terminfo/c/cons60-m +OLD_FILES+=usr/share/terminfo/c/cons60l1 +OLD_FILES+=usr/share/terminfo/c/cons60l1-m +OLD_FILES+=usr/share/terminfo/c/cons60r +OLD_FILES+=usr/share/terminfo/c/cons60r-m +OLD_FILES+=usr/share/terminfo/c/contel300 +OLD_FILES+=usr/share/terminfo/c/contel301 +OLD_FILES+=usr/share/terminfo/c/contel320 +OLD_FILES+=usr/share/terminfo/c/contel321 +OLD_FILES+=usr/share/terminfo/c/cops +OLD_FILES+=usr/share/terminfo/c/cops-10 +OLD_FILES+=usr/share/terminfo/c/cops10 +OLD_FILES+=usr/share/terminfo/c/crt +OLD_FILES+=usr/share/terminfo/c/crt-vt220 +OLD_FILES+=usr/share/terminfo/c/cs10 +OLD_FILES+=usr/share/terminfo/c/cs10-w +OLD_FILES+=usr/share/terminfo/c/ct82 +OLD_FILES+=usr/share/terminfo/c/ct8500 +OLD_FILES+=usr/share/terminfo/c/ctrm +OLD_FILES+=usr/share/terminfo/c/cx +OLD_FILES+=usr/share/terminfo/c/cx100 +OLD_FILES+=usr/share/terminfo/c/cyb110 +OLD_FILES+=usr/share/terminfo/c/cyb83 +OLD_FILES+=usr/share/terminfo/c/cygwin +OLD_FILES+=usr/share/terminfo/c/cygwinB19 +OLD_FILES+=usr/share/terminfo/c/cygwinDBG +OLD_DIRS+=usr/share/terminfo/c/ +OLD_FILES+=usr/share/terminfo/d/d132 +OLD_FILES+=usr/share/terminfo/d/d2 +OLD_FILES+=usr/share/terminfo/d/d2-dg +OLD_FILES+=usr/share/terminfo/d/d200 +OLD_FILES+=usr/share/terminfo/d/d200-dg +OLD_FILES+=usr/share/terminfo/d/d210 +OLD_FILES+=usr/share/terminfo/d/d210-dg +OLD_FILES+=usr/share/terminfo/d/d211 +OLD_FILES+=usr/share/terminfo/d/d211-7b +OLD_FILES+=usr/share/terminfo/d/d211-dg +OLD_FILES+=usr/share/terminfo/d/d214 +OLD_FILES+=usr/share/terminfo/d/d214-dg +OLD_FILES+=usr/share/terminfo/d/d215 +OLD_FILES+=usr/share/terminfo/d/d215-7b +OLD_FILES+=usr/share/terminfo/d/d215-dg +OLD_FILES+=usr/share/terminfo/d/d216+ +OLD_FILES+=usr/share/terminfo/d/d216+25 +OLD_FILES+=usr/share/terminfo/d/d216+dg +OLD_FILES+=usr/share/terminfo/d/d216-dg +OLD_FILES+=usr/share/terminfo/d/d216-unix +OLD_FILES+=usr/share/terminfo/d/d216-unix-25 +OLD_FILES+=usr/share/terminfo/d/d216e+ +OLD_FILES+=usr/share/terminfo/d/d216e+dg +OLD_FILES+=usr/share/terminfo/d/d216e-dg +OLD_FILES+=usr/share/terminfo/d/d216e-unix +OLD_FILES+=usr/share/terminfo/d/d217-dg +OLD_FILES+=usr/share/terminfo/d/d217-unix +OLD_FILES+=usr/share/terminfo/d/d217-unix-25 +OLD_FILES+=usr/share/terminfo/d/d220 +OLD_FILES+=usr/share/terminfo/d/d220-7b +OLD_FILES+=usr/share/terminfo/d/d220-dg +OLD_FILES+=usr/share/terminfo/d/d230 +OLD_FILES+=usr/share/terminfo/d/d230-dg +OLD_FILES+=usr/share/terminfo/d/d230c +OLD_FILES+=usr/share/terminfo/d/d230c-dg +OLD_FILES+=usr/share/terminfo/d/d400 +OLD_FILES+=usr/share/terminfo/d/d400-dg +OLD_FILES+=usr/share/terminfo/d/d410 +OLD_FILES+=usr/share/terminfo/d/d410-7b +OLD_FILES+=usr/share/terminfo/d/d410-7b-w +OLD_FILES+=usr/share/terminfo/d/d410-dg +OLD_FILES+=usr/share/terminfo/d/d410-w +OLD_FILES+=usr/share/terminfo/d/d411 +OLD_FILES+=usr/share/terminfo/d/d411-7b +OLD_FILES+=usr/share/terminfo/d/d411-7b-w +OLD_FILES+=usr/share/terminfo/d/d411-dg +OLD_FILES+=usr/share/terminfo/d/d411-w +OLD_FILES+=usr/share/terminfo/d/d412+ +OLD_FILES+=usr/share/terminfo/d/d412+25 +OLD_FILES+=usr/share/terminfo/d/d412+dg +OLD_FILES+=usr/share/terminfo/d/d412+s +OLD_FILES+=usr/share/terminfo/d/d412+sr +OLD_FILES+=usr/share/terminfo/d/d412+w +OLD_FILES+=usr/share/terminfo/d/d412-dg +OLD_FILES+=usr/share/terminfo/d/d412-unix +OLD_FILES+=usr/share/terminfo/d/d412-unix-25 +OLD_FILES+=usr/share/terminfo/d/d412-unix-s +OLD_FILES+=usr/share/terminfo/d/d412-unix-sr +OLD_FILES+=usr/share/terminfo/d/d412-unix-w +OLD_FILES+=usr/share/terminfo/d/d413-dg +OLD_FILES+=usr/share/terminfo/d/d413-unix +OLD_FILES+=usr/share/terminfo/d/d413-unix-25 +OLD_FILES+=usr/share/terminfo/d/d413-unix-s +OLD_FILES+=usr/share/terminfo/d/d413-unix-sr +OLD_FILES+=usr/share/terminfo/d/d413-unix-w +OLD_FILES+=usr/share/terminfo/d/d414-unix +OLD_FILES+=usr/share/terminfo/d/d414-unix-25 +OLD_FILES+=usr/share/terminfo/d/d414-unix-s +OLD_FILES+=usr/share/terminfo/d/d414-unix-sr +OLD_FILES+=usr/share/terminfo/d/d414-unix-w +OLD_FILES+=usr/share/terminfo/d/d430-dg +OLD_FILES+=usr/share/terminfo/d/d430-dg-ccc +OLD_FILES+=usr/share/terminfo/d/d430-unix +OLD_FILES+=usr/share/terminfo/d/d430-unix-25 +OLD_FILES+=usr/share/terminfo/d/d430-unix-25-ccc +OLD_FILES+=usr/share/terminfo/d/d430-unix-ccc +OLD_FILES+=usr/share/terminfo/d/d430-unix-s +OLD_FILES+=usr/share/terminfo/d/d430-unix-s-ccc +OLD_FILES+=usr/share/terminfo/d/d430-unix-sr +OLD_FILES+=usr/share/terminfo/d/d430-unix-sr-ccc +OLD_FILES+=usr/share/terminfo/d/d430-unix-w +OLD_FILES+=usr/share/terminfo/d/d430-unix-w-ccc +OLD_FILES+=usr/share/terminfo/d/d430c-dg +OLD_FILES+=usr/share/terminfo/d/d430c-dg-ccc +OLD_FILES+=usr/share/terminfo/d/d430c-unix +OLD_FILES+=usr/share/terminfo/d/d430c-unix-25 +OLD_FILES+=usr/share/terminfo/d/d430c-unix-25-ccc +OLD_FILES+=usr/share/terminfo/d/d430c-unix-ccc +OLD_FILES+=usr/share/terminfo/d/d430c-unix-s +OLD_FILES+=usr/share/terminfo/d/d430c-unix-s-ccc +OLD_FILES+=usr/share/terminfo/d/d430c-unix-sr +OLD_FILES+=usr/share/terminfo/d/d430c-unix-sr-ccc +OLD_FILES+=usr/share/terminfo/d/d430c-unix-w +OLD_FILES+=usr/share/terminfo/d/d430c-unix-w-ccc +OLD_FILES+=usr/share/terminfo/d/d450 +OLD_FILES+=usr/share/terminfo/d/d450-dg +OLD_FILES+=usr/share/terminfo/d/d460 +OLD_FILES+=usr/share/terminfo/d/d460-7b +OLD_FILES+=usr/share/terminfo/d/d460-7b-w +OLD_FILES+=usr/share/terminfo/d/d460-dg +OLD_FILES+=usr/share/terminfo/d/d460-w +OLD_FILES+=usr/share/terminfo/d/d461 +OLD_FILES+=usr/share/terminfo/d/d461-7b *** 15205 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Sun Jun 13 03:18:03 2021 Return-Path: Delivered-To: dev-commits-src-main@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 1A0E16558FC; Sun, 13 Jun 2021 03:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2fsk6xndz4pDh; Sun, 13 Jun 2021 03:18:02 +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 D529A19D40; Sun, 13 Jun 2021 03:18:02 +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 15D3I2pn074098; Sun, 13 Jun 2021 03:18:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D3I2Gf074097; Sun, 13 Jun 2021 03:18:02 GMT (envelope-from git) Date: Sun, 13 Jun 2021 03:18:02 GMT Message-Id: <202106130318.15D3I2Gf074097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: eee7786f7523 - main - zfs: fix invalid entries in ObsoleteFiles.inc added in 3ff01b231 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eee7786f75238ad6a96ab95d8f2ca329a931e00f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 03:18:03 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=eee7786f75238ad6a96ab95d8f2ca329a931e00f commit eee7786f75238ad6a96ab95d8f2ca329a931e00f Author: Martin Matuska AuthorDate: 2021-06-13 03:17:15 +0000 Commit: Martin Matuska CommitDate: 2021-06-13 03:17:15 +0000 zfs: fix invalid entries in ObsoleteFiles.inc added in 3ff01b231 --- ObsoleteFiles.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1e47821fe696..be8c22346501 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -44,11 +44,11 @@ OLD_FILES+=usr/share/man/man5/spl-module-parameters.5.gz OLD_FILES+=usr/share/man/man5/zfs-events.5.gz OLD_FILES+=usr/share/man/man5/zfs-module-parameters.5.gz -OLD_FILES+=usr/share/man/man8/zfsconcepts.8 -OLD_FILES+=usr/share/man/man8/zfsprops.8 +OLD_FILES+=usr/share/man/man8/zfsconcepts.8.gz +OLD_FILES+=usr/share/man/man8/zfsprops.8.gz OLD_FILES+=usr/share/man/man5/zpool-features.5.gz -OLD_FILES+=usr/share/man/man8/zpoolconcepts.8 -OLD_FILES+=usr/share/man/man8/zpoolprops.8 +OLD_FILES+=usr/share/man/man8/zpoolconcepts.8.gz +OLD_FILES+=usr/share/man/man8/zpoolprops.8.gz # 20210611: Remove svn and svnlite OLD_FILES+=usr/bin/svn From owner-dev-commits-src-main@freebsd.org Sun Jun 13 03:46:03 2021 Return-Path: Delivered-To: dev-commits-src-main@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 4FC35655DBE; Sun, 13 Jun 2021 03:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2gV31SLBz4q1j; Sun, 13 Jun 2021 03:46: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 1A7F81A59E; Sun, 13 Jun 2021 03:46: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 15D3k3Eq012814; Sun, 13 Jun 2021 03:46:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D3k3Xh012813; Sun, 13 Jun 2021 03:46:03 GMT (envelope-from git) Date: Sun, 13 Jun 2021 03:46:03 GMT Message-Id: <202106130346.15D3k3Xh012813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 44877c8db05b - main - zfs: change zstream -> zstreamdump link into a symlink MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44877c8db05b80e7c3034c692414d580671680d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 03:46:03 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=44877c8db05b80e7c3034c692414d580671680d7 commit 44877c8db05b80e7c3034c692414d580671680d7 Author: Martin Matuska AuthorDate: 2021-06-13 03:17:15 +0000 Commit: Martin Matuska CommitDate: 2021-06-13 03:40:18 +0000 zfs: change zstream -> zstreamdump link into a symlink --- cddl/usr.bin/zstream/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile index ac3bfeb68cf4..cfcff71a813f 100644 --- a/cddl/usr.bin/zstream/Makefile +++ b/cddl/usr.bin/zstream/Makefile @@ -15,7 +15,7 @@ SRCS= \ zstream_redup.c \ zstream_token.c -LINKS= ${BINDIR}/zstream ${BINDIR}/zstreamdump +SYMLINKS= ${BINDIR}/zstream ${BINDIR}/zstreamdump WARNS?= 2 CFLAGS+= \ From owner-dev-commits-src-main@freebsd.org Sun Jun 13 04:21:59 2021 Return-Path: Delivered-To: dev-commits-src-main@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 BDEB4656888; Sun, 13 Jun 2021 04:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2hHW4YXBz4rT7; Sun, 13 Jun 2021 04:21: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 84B601AD29; Sun, 13 Jun 2021 04:21: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 15D4Lx0I065152; Sun, 13 Jun 2021 04:21:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D4Lxt4065151; Sun, 13 Jun 2021 04:21:59 GMT (envelope-from git) Date: Sun, 13 Jun 2021 04:21:59 GMT Message-Id: <202106130421.15D4Lxt4065151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7cf9caf294ce - main - updating: note recent removals MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cf9caf294ce692b8c01b201fe00b65a8a413937 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 04:21:59 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7cf9caf294ce692b8c01b201fe00b65a8a413937 commit 7cf9caf294ce692b8c01b201fe00b65a8a413937 Author: Warner Losh AuthorDate: 2021-06-13 04:21:28 +0000 Commit: Warner Losh CommitDate: 2021-06-13 04:21:28 +0000 updating: note recent removals --- UPDATING | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UPDATING b/UPDATING index 6206e658d524..8b4d4a4820f6 100644 --- a/UPDATING +++ b/UPDATING @@ -27,11 +27,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20210611: + svnlite has been removed from base. Should you need svn for any reason + please install the svn package or port. + 20210611: Commit e1a907a25cfa changed the internal KAPI between the krpc and nfsserver. As such, both modules must be rebuilt from sources. Bump __FreeBSD_version to 1400022. +20210610: + The an(4) driver has been removed from FreeBSD. + 20210608: The vendor/openzfs branch was renamed to vendor/openzfs/legacy to start tracking OpenZFS upstream more closely. Please see From owner-dev-commits-src-main@freebsd.org Sun Jun 13 04:28:14 2021 Return-Path: Delivered-To: dev-commits-src-main@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 00E8B656A24; Sun, 13 Jun 2021 04:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2hQj6Ljsz4rrS; Sun, 13 Jun 2021 04:28:13 +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 C21461AD92; Sun, 13 Jun 2021 04:28:13 +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 15D4SDaD066520; Sun, 13 Jun 2021 04:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D4SDtT066519; Sun, 13 Jun 2021 04:28:13 GMT (envelope-from git) Date: Sun, 13 Jun 2021 04:28:13 GMT Message-Id: <202106130428.15D4SDtT066519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f06fa6f88733 - main - syslogd: fix WITHOUT_INET builds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f06fa6f88733d709a5f9dd3a27b1a08571e49e6b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 04:28:14 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f06fa6f88733d709a5f9dd3a27b1a08571e49e6b commit f06fa6f88733d709a5f9dd3a27b1a08571e49e6b Author: Artem Khramov AuthorDate: 2021-06-12 17:21:13 +0000 Commit: Warner Losh CommitDate: 2021-06-13 04:25:35 +0000 syslogd: fix WITHOUT_INET builds Since 2d82b47 syslogd can't be built with `WITHOUT_INET` or `WITHOUT_INET6` build variables set, because `iovlist_truncate` is not defined but used. This change wraps the problematic `iovlist_truncate` call within ifdef directive. It's compiled out in this situation... Pull Request: https://github.com/freebsd/freebsd-src/pull/475 Reviewed by: imp@ (commit message slightly tweaked) --- usr.sbin/syslogd/syslogd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index d8a2c0a5680e..1837c41c4e8b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1867,8 +1867,10 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) dprintf("\n"); } +#if defined(INET) || defined(INET6) /* Truncate messages to maximum forward length. */ iovlist_truncate(il, MaxForwardLen); +#endif lsent = 0; for (r = f->fu_forw_addr; r; r = r->ai_next) { From owner-dev-commits-src-main@freebsd.org Sun Jun 13 08:31:13 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2B6B4658DFA; Sun, 13 Jun 2021 08:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G2nq46G9Tz56Kd; Sun, 13 Jun 2021 08:31: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 BFD961DF23; Sun, 13 Jun 2021 08:31: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 15D8VCDr093159; Sun, 13 Jun 2021 08:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15D8VCib093158; Sun, 13 Jun 2021 08:31:12 GMT (envelope-from git) Date: Sun, 13 Jun 2021 08:31:12 GMT Message-Id: <202106130831.15D8VCib093158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 8345c513c552 - main - sg: get rid of unused include. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8345c513c552f458e0d3993e2606c5e98bb79c8b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 08:31:13 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=8345c513c552f458e0d3993e2606c5e98bb79c8b commit 8345c513c552f458e0d3993e2606c5e98bb79c8b Author: Dmitry Chagin AuthorDate: 2021-06-13 08:30:49 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-13 08:30:49 +0000 sg: get rid of unused include. sg driver does not depends on the Linuxulator any more. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D30750 MFC after: 2 weeks --- sys/cam/scsi/scsi_sg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index 8e3f0a27ab58..6b6e65a39f75 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -60,8 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - typedef enum { SG_FLAG_LOCKED = 0x01, SG_FLAG_INVALID = 0x02 From owner-dev-commits-src-main@freebsd.org Sun Jun 13 16:23:40 2021 Return-Path: Delivered-To: dev-commits-src-main@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 9E73365F18B; Sun, 13 Jun 2021 16:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G30JD3nv6z3tW5; Sun, 13 Jun 2021 16:23: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 6A6E423F7A; Sun, 13 Jun 2021 16:23: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 15DGNexU020443; Sun, 13 Jun 2021 16:23:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DGNeEZ020442; Sun, 13 Jun 2021 16:23:40 GMT (envelope-from git) Date: Sun, 13 Jun 2021 16:23:40 GMT Message-Id: <202106131623.15DGNeEZ020442@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d21c884e52eb - main - USB/U3G: Added Panasonic CF-F9 GOBI 3G modem to U3G module. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d21c884e52eb3b3978abc10ed79b9cd323266684 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 16:23:40 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d21c884e52eb3b3978abc10ed79b9cd323266684 commit d21c884e52eb3b3978abc10ed79b9cd323266684 Author: CeDeROM Tomasz CEDRO AuthorDate: 2021-06-13 16:08:42 +0000 Commit: Warner Losh CommitDate: 2021-06-13 16:23:01 +0000 USB/U3G: Added Panasonic CF-F9 GOBI 3G modem to U3G module. Add kernel support for the Panasonic GOBI 3g modem. Note: GOBI modems require QDL firmware to be uploaded with gobi_loader: https://github.com/cederom/gobi_loader. Signed-off-by: CeDeROM Tomasz CEDRO Pull Request: https://github.com/freebsd/freebsd-src/pull/115 Reviewed by: imp (split off kernel bits from original) --- sys/dev/usb/serial/u3g.c | 2 ++ sys/dev/usb/usbdevs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 8cc468dec880..22e4e8f6b2bb 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -397,6 +397,8 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(OPTION, GTMAXHSUPA, 0), U3G_DEV(OPTION, GTMAXHSUPAE, 0), U3G_DEV(OPTION, VODAFONEMC3G, 0), + U3G_DEV(PANASONIC, CFF9_3G_QDL, 0), + U3G_DEV(PANASONIC, CFF9_3G, 0), U3G_DEV(QISDA, H20_1, 0), U3G_DEV(QISDA, H20_2, 0), U3G_DEV(QISDA, H21_1, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 53e074d3fd61..1183b4e283e4 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3636,6 +3636,8 @@ product PANASONIC KXLRW32AN 0x0d09 CD-R Drive KXL-RW32AN product PANASONIC KXLCB20AN 0x0d0a CD-R Drive KXL-CB20AN product PANASONIC KXLCB35AN 0x0d0e DVD-ROM & CD-R/RW product PANASONIC SDCAAE 0x1b00 MultiMediaCard +product PANASONIC CFF9_3G_QDL 0x250e ToughBook CF-F9 GOBI 3G Modem Loader +product PANASONIC CFF9_3G 0x250f ToughBook CF-F9 GOBI 3G Modem product PANASONIC TYTP50P6S 0x3900 TY-TP50P6-S 50in Touch Panel /* Papouch products */ From owner-dev-commits-src-main@freebsd.org Sun Jun 13 16:23:41 2021 Return-Path: Delivered-To: dev-commits-src-main@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 C392B65EE58; Sun, 13 Jun 2021 16:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G30JF4xnDz3tY2; Sun, 13 Jun 2021 16:23:41 +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 8D57F243F1; Sun, 13 Jun 2021 16:23:41 +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 15DGNf3Y020467; Sun, 13 Jun 2021 16:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DGNfcx020466; Sun, 13 Jun 2021 16:23:41 GMT (envelope-from git) Date: Sun, 13 Jun 2021 16:23:41 GMT Message-Id: <202106131623.15DGNfcx020466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bb130ff39747 - main - u3g: Document Panasonic CF-F9 GOBI support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb130ff39747b94592cb26d71b7cb097b9a4ea6b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 16:23:41 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bb130ff39747b94592cb26d71b7cb097b9a4ea6b commit bb130ff39747b94592cb26d71b7cb097b9a4ea6b Author: Warner Losh AuthorDate: 2021-06-13 16:14:54 +0000 Commit: Warner Losh CommitDate: 2021-06-13 16:23:01 +0000 u3g: Document Panasonic CF-F9 GOBI support Document that the u3g driver supports the Panasonic CF-F9 GOBI. Note that gobi_loader is needed and give URL for that. There is a separate review for during a related version into a port at D22938, but it seems stalled. I'll update the docs when it arrives in ports. Sponsored by: Netflix --- share/man/man4/u3g.4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4 index 014a789cb57c..64c8b0a5015f 100644 --- a/share/man/man4/u3g.4 +++ b/share/man/man4/u3g.4 @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2018 +.Dd June 13, 2021 .Dt U3G 4 .Os .Sh NAME @@ -75,6 +75,8 @@ Huawei B190, E180v, E220 ('') Novatel U740, MC950D, X950D, etc. .It Sierra MC875U, MC8775U, etc. +.It +Panasonic CF-F9 GOBI .El .Pp (See @@ -147,3 +149,7 @@ Hardware for testing was provided by AnyWi Technologies, Leiden, NL. The automatic mode switch from disk mode to modem mode does not work unless the driver is either built into the kernel or loaded before the device is connected. +.Pp +The Panasonic CF-F9 requires the gobi loader available from +.Pa https://github.com/cederom/gobi_loader +and loading of the firmware before it will function. From owner-dev-commits-src-main@freebsd.org Sun Jun 13 20:02:52 2021 Return-Path: Delivered-To: dev-commits-src-main@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 8FD1365039D; Sun, 13 Jun 2021 20:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G35983LM2z4gl2; Sun, 13 Jun 2021 20:02: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 5AC7926CE6; Sun, 13 Jun 2021 20:02: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 15DK2qLY014087; Sun, 13 Jun 2021 20:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DK2kET014079; Sun, 13 Jun 2021 20:02:46 GMT (envelope-from git) Date: Sun, 13 Jun 2021 20:02:46 GMT Message-Id: <202106132002.15DK2kET014079@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: e8d8bef961a5 - main - Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef 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: e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 20:02:52 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 commit e8d8bef961a50d4dc22501cde4fb9fb0be1b2532 Merge: bb130ff39747 b60736ec1405 Author: Dimitry Andric AuthorDate: 2021-06-13 19:31:46 +0000 Commit: Dimitry Andric CommitDate: 2021-06-13 19:37:19 +0000 Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the upstream release/12.x branch was created. PR: 255570 MFC after: 6 weeks ObsoleteFiles.inc | 284 ++ contrib/llvm-project/clang/include/clang-c/Index.h | 88 +- .../llvm-project/clang/include/clang-c/Rewrite.h | 63 + .../include/clang/APINotes/APINotesYAMLCompiler.h | 24 + .../clang/include/clang/APINotes/Types.h | 734 +++ .../clang/include/clang/ARCMigrate/FileRemapper.h | 8 + .../llvm-project/clang/include/clang/AST/APValue.h | 163 +- .../clang/include/clang/AST/ASTContext.h | 127 +- .../llvm-project/clang/include/clang/AST/ASTFwd.h | 6 +- .../clang/include/clang/AST/ASTImporter.h | 8 + .../clang/include/clang/AST/ASTNodeTraverser.h | 72 +- .../include/clang/AST/ASTStructuralEquivalence.h | 7 + .../clang/include/clang/AST/ASTTypeTraits.h | 74 +- .../clang/include/clang/AST/AbstractBasicReader.h | 34 + .../clang/include/clang/AST/AbstractBasicWriter.h | 35 + .../llvm-project/clang/include/clang/AST/Attr.h | 39 +- .../clang/include/clang/AST/CXXInheritance.h | 10 - .../clang/AST/CXXRecordDeclDefinitionBits.def | 7 + .../clang/include/clang/AST/CanonicalType.h | 4 +- .../clang/include/clang/AST/CommentLexer.h | 31 +- .../clang/include/clang/AST/ComputeDependence.h | 4 +- .../llvm-project/clang/include/clang/AST/Decl.h | 134 +- .../clang/include/clang/AST/DeclBase.h | 3 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 96 +- .../clang/include/clang/AST/DeclObjC.h | 45 +- .../clang/include/clang/AST/DeclOpenMP.h | 246 +- .../clang/include/clang/AST/DeclTemplate.h | 117 +- .../clang/include/clang/AST/DeclarationName.h | 23 +- .../clang/include/clang/AST/DependenceFlags.h | 1 + .../clang/include/clang/AST/DependentDiagnostic.h | 10 +- .../llvm-project/clang/include/clang/AST/Expr.h | 402 +- .../llvm-project/clang/include/clang/AST/ExprCXX.h | 297 +- .../clang/include/clang/AST/ExprConcepts.h | 6 +- .../clang/include/clang/AST/ExprObjC.h | 4 +- .../clang/include/clang/AST/ExternalASTSource.h | 4 - .../clang/include/clang/AST/GlobalDecl.h | 1 + .../clang/include/clang/AST/IgnoreExpr.h | 161 + .../llvm-project/clang/include/clang/AST/Mangle.h | 17 +- .../clang/include/clang/AST/NestedNameSpecifier.h | 34 +- .../clang/include/clang/AST/OpenMPClause.h | 494 +- .../clang/include/clang/AST/OperationKinds.def | 11 +- .../clang/include/clang/AST/OptionalDiagnostic.h | 2 +- .../clang/include/clang/AST/ParentMap.h | 4 +- .../clang/include/clang/AST/ParentMapContext.h | 13 +- .../clang/include/clang/AST/PrettyPrinter.h | 40 +- .../clang/include/clang/AST/PropertiesBase.td | 308 ++ .../clang/include/clang/AST/RecordLayout.h | 65 +- .../clang/include/clang/AST/RecursiveASTVisitor.h | 56 +- .../clang/include/clang/AST/Redeclarable.h | 15 + .../llvm-project/clang/include/clang/AST/Stmt.h | 60 +- .../clang/include/clang/AST/StmtIterator.h | 9 +- .../clang/include/clang/AST/StmtOpenMP.h | 1653 +++--- .../clang/include/clang/AST/TemplateBase.h | 72 +- .../clang/include/clang/AST/TemplateName.h | 6 +- .../clang/include/clang/AST/TextNodeDumper.h | 3 + .../llvm-project/clang/include/clang/AST/Type.h | 163 +- .../llvm-project/clang/include/clang/AST/TypeLoc.h | 93 +- .../clang/include/clang/AST/TypeProperties.td | 12 +- .../include/clang/ASTMatchers/ASTMatchFinder.h | 4 + .../clang/include/clang/ASTMatchers/ASTMatchers.h | 574 ++- .../clang/ASTMatchers/ASTMatchersInternal.h | 996 ++-- .../include/clang/ASTMatchers/ASTMatchersMacros.h | 58 +- .../clang/ASTMatchers/Dynamic/VariantValue.h | 40 +- .../clang/Analysis/Analyses/CalledOnceCheck.h | 112 + .../include/clang/Analysis/Analyses/Dominators.h | 70 - .../clang/Analysis/Analyses/LiveVariables.h | 18 +- .../include/clang/Analysis/Analyses/ThreadSafety.h | 8 + .../clang/Analysis/Analyses/ThreadSafetyTIL.h | 4 +- .../clang/include/clang/Analysis/CallGraph.h | 4 +- .../clang/include/clang/Analysis/IssueHash.h | 49 + .../clang/include/clang/Analysis/PathDiagnostic.h | 39 + .../clang/include/clang/Basic/AddressSpaces.h | 2 + .../clang/include/clang/Basic/AlignedAllocation.h | 2 + .../llvm-project/clang/include/clang/Basic/Attr.td | 286 +- .../clang/include/clang/Basic/AttrDocs.td | 1102 +++- .../clang/include/clang/Basic/Builtins.def | 58 + .../clang/include/clang/Basic/BuiltinsAArch64.def | 11 + .../clang/include/clang/Basic/BuiltinsAMDGPU.def | 6 + .../clang/include/clang/Basic/BuiltinsBPF.def | 8 +- .../clang/include/clang/Basic/BuiltinsNVPTX.def | 2 +- .../clang/include/clang/Basic/BuiltinsPPC.def | 236 +- .../include/clang/Basic/BuiltinsWebAssembly.def | 136 +- .../clang/include/clang/Basic/BuiltinsX86.def | 51 +- .../clang/include/clang/Basic/BuiltinsX86_64.def | 11 + .../clang/include/clang/Basic/CodeGenOptions.def | 50 +- .../clang/include/clang/Basic/CodeGenOptions.h | 46 +- .../llvm-project/clang/include/clang/Basic/Cuda.h | 8 + .../clang/include/clang/Basic/DebugInfoOptions.h | 6 +- .../clang/include/clang/Basic/DeclNodes.td | 1 + .../clang/include/clang/Basic/Diagnostic.h | 408 +- .../clang/include/clang/Basic/Diagnostic.td | 10 + .../clang/include/clang/Basic/DiagnosticAST.h | 2 +- .../include/clang/Basic/DiagnosticASTKinds.td | 11 +- .../clang/include/clang/Basic/DiagnosticAnalysis.h | 2 +- .../clang/include/clang/Basic/DiagnosticComment.h | 2 +- .../include/clang/Basic/DiagnosticCommonKinds.td | 6 + .../clang/include/clang/Basic/DiagnosticCrossTU.h | 2 +- .../clang/include/clang/Basic/DiagnosticDriver.h | 2 +- .../include/clang/Basic/DiagnosticDriverKinds.td | 39 +- .../clang/include/clang/Basic/DiagnosticFrontend.h | 2 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 22 +- .../clang/include/clang/Basic/DiagnosticGroups.td | 46 +- .../clang/include/clang/Basic/DiagnosticIDs.h | 12 +- .../clang/include/clang/Basic/DiagnosticLex.h | 2 +- .../include/clang/Basic/DiagnosticLexKinds.td | 9 +- .../include/clang/Basic/DiagnosticOptions.def | 1 + .../clang/include/clang/Basic/DiagnosticOptions.h | 12 + .../clang/include/clang/Basic/DiagnosticParse.h | 2 +- .../include/clang/Basic/DiagnosticParseKinds.td | 86 +- .../include/clang/Basic/DiagnosticRefactoring.h | 2 +- .../clang/include/clang/Basic/DiagnosticSema.h | 2 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 386 +- .../include/clang/Basic/DiagnosticSerialization.h | 2 +- .../clang/Basic/DiagnosticSerializationKinds.td | 19 +- .../clang/include/clang/Basic/DirectoryEntry.h | 298 ++ .../clang/include/clang/Basic/FPOptions.def | 4 +- .../clang/include/clang/Basic/Features.def | 3 + .../clang/include/clang/Basic/FileEntry.h | 406 ++ .../clang/include/clang/Basic/FileManager.h | 158 +- .../llvm-project/clang/include/clang/Basic/LLVM.h | 1 + .../clang/include/clang/Basic/LangOptions.def | 42 +- .../clang/include/clang/Basic/LangOptions.h | 165 +- .../clang/include/clang/Basic/LangStandard.h | 14 +- .../clang/include/clang/Basic/LangStandards.def | 14 + .../clang/include/clang/Basic/Module.h | 55 +- .../clang/include/clang/Basic/OpenCLExtensions.def | 142 +- .../clang/include/clang/Basic/OpenCLOptions.h | 213 +- .../clang/include/clang/Basic/OpenMPKinds.def | 20 +- .../clang/include/clang/Basic/OpenMPKinds.h | 23 +- .../clang/include/clang/Basic/OperatorKinds.h | 5 + .../clang/include/clang/Basic/PPCTypes.def | 38 + .../clang/include/clang/Basic/PartialDiagnostic.h | 277 +- .../clang/include/clang/Basic/ProfileList.h | 58 + .../clang/include/clang/Basic/Sanitizers.def | 4 +- .../clang/include/clang/Basic/SourceLocation.h | 31 + .../clang/include/clang/Basic/SourceManager.h | 1022 ++-- .../clang/include/clang/Basic/Specifiers.h | 34 +- .../clang/include/clang/Basic/TargetCXXABI.h | 25 +- .../clang/include/clang/Basic/TargetID.h | 56 + .../clang/include/clang/Basic/TargetInfo.h | 78 +- .../clang/include/clang/Basic/TargetOptions.h | 8 +- .../clang/include/clang/Basic/TokenKinds.def | 17 +- .../clang/include/clang/Basic/arm_mve.td | 12 +- .../clang/include/clang/Basic/arm_mve_defs.td | 8 +- .../clang/include/clang/Basic/arm_neon.td | 73 +- .../clang/include/clang/CodeGen/BackendUtil.h | 5 - .../clang/include/clang/CodeGen/CGFunctionInfo.h | 60 +- .../clang/include/clang/Driver/Compilation.h | 17 + .../clang/include/clang/Driver/Distro.h | 17 +- .../clang/include/clang/Driver/Driver.h | 4 +- .../llvm-project/clang/include/clang/Driver/Job.h | 29 +- .../clang/include/clang/Driver/Options.h | 8 +- .../clang/include/clang/Driver/Options.td | 3038 ++++++++---- .../clang/include/clang/Driver/SanitizerArgs.h | 5 +- .../clang/include/clang/Driver/ToolChain.h | 32 +- .../clang/include/clang/Driver/XRayArgs.h | 2 + .../clang/include/clang/Edit/EditedSource.h | 2 +- .../clang/include/clang/Format/Format.h | 1081 +++- .../clang/include/clang/Frontend/ASTUnit.h | 18 +- .../include/clang/Frontend/CompilerInstance.h | 68 +- .../include/clang/Frontend/CompilerInvocation.h | 22 +- .../clang/include/clang/Frontend/FrontendAction.h | 2 +- .../clang/include/clang/Frontend/FrontendActions.h | 2 + .../clang/include/clang/Frontend/FrontendOptions.h | 35 +- .../include/clang/Frontend/PrecompiledPreamble.h | 9 +- .../clang/include/clang/Frontend/Utils.h | 8 +- .../SerializablePathCollection.h | 129 + .../clang/include/clang/Lex/HeaderSearch.h | 34 + .../clang/include/clang/Lex/HeaderSearchOptions.h | 9 +- .../llvm-project/clang/include/clang/Lex/Lexer.h | 10 +- .../clang/include/clang/Lex/ModuleMap.h | 13 +- .../clang/include/clang/Lex/Preprocessor.h | 24 + ...cessorExcludedConditionalDirectiveSkipMapping.h | 3 +- .../clang/include/clang/Lex/PreprocessorOptions.h | 26 +- .../clang/include/clang/Parse/Parser.h | 70 +- .../include/clang/Sema/CodeCompleteConsumer.h | 3 - .../clang/include/clang/Sema/DeclSpec.h | 581 +-- .../clang/include/clang/Sema/DelayedDiagnostic.h | 19 +- .../clang/include/clang/Sema/Designator.h | 49 +- .../clang/include/clang/Sema/Initialization.h | 61 +- .../clang/Sema/MultiplexExternalSemaSource.h | 2 - .../clang/include/clang/Sema/Overload.h | 6 + .../clang/include/clang/Sema/Ownership.h | 23 +- .../clang/include/clang/Sema/ParsedAttr.h | 44 +- .../clang/include/clang/Sema/ScopeInfo.h | 15 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 831 ++-- .../clang/include/clang/Sema/Template.h | 2 +- .../include/clang/Serialization/ASTBitCodes.h | 10 +- .../clang/include/clang/Serialization/ASTReader.h | 51 +- .../include/clang/Serialization/ASTRecordReader.h | 6 +- .../include/clang/Serialization/ASTRecordWriter.h | 15 +- .../clang/include/clang/Serialization/ASTWriter.h | 10 + .../clang/include/clang/Serialization/ModuleFile.h | 19 +- .../include/clang/Serialization/ModuleManager.h | 6 +- .../clang/StaticAnalyzer/Checkers/Checkers.td | 16 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 34 +- .../Core/BugReporter/BugReporterVisitors.h | 5 +- .../include/clang/StaticAnalyzer/Core/IssueHash.h | 50 - .../StaticAnalyzer/Core/PathDiagnosticConsumers.h | 7 +- .../Core/PathSensitive/BasicValueFactory.h | 16 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 56 +- .../Core/PathSensitive/CheckerContext.h | 20 + .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 17 + .../Core/PathSensitive/RangedConstraintManager.h | 22 +- .../Core/PathSensitive/SMTConstraintManager.h | 3 +- .../StaticAnalyzer/Core/PathSensitive/SMTConv.h | 18 +- .../Core/PathSensitive/SValBuilder.h | 2 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 14 +- .../StaticAnalyzer/Core/PathSensitive/SymExpr.h | 3 + .../Core/PathSensitive/SymbolManager.h | 12 +- .../clang/include/clang/Testing/TestClangConfig.h | 2 + .../include/clang/Tooling/CompilationDatabase.h | 22 +- .../clang/Tooling/Inclusions/HeaderIncludes.h | 2 - .../clang/Tooling/Inclusions/IncludeStyle.h | 21 +- .../clang/Tooling/{Core => Refactoring}/Lookup.h | 6 +- .../Tooling/Refactoring/RefactoringRuleContext.h | 2 +- .../Tooling/Refactoring/Rename/SymbolOccurrences.h | 13 +- .../clang/include/clang/Tooling/Syntax/BuildTree.h | 35 +- .../clang/include/clang/Tooling/Syntax/Nodes.h | 648 +-- .../clang/include/clang/Tooling/Syntax/Nodes.td | 296 ++ .../clang/include/clang/Tooling/Syntax/Syntax.td | 85 + .../clang/include/clang/Tooling/Syntax/Tokens.h | 12 +- .../clang/include/clang/Tooling/Syntax/Tree.h | 216 +- .../clang/include/clang/Tooling/Tooling.h | 11 - .../clang/Tooling/Transformer/MatchConsumer.h | 6 - .../clang/Tooling/Transformer/RangeSelector.h | 29 +- .../clang/Tooling/Transformer/RewriteRule.h | 290 +- .../include/clang/Tooling/Transformer/Stencil.h | 11 +- .../clang/include/clang/module.modulemap | 1 + .../clang/lib/APINotes/APINotesFormat.h | 255 + .../clang/lib/APINotes/APINotesTypes.cpp | 107 + .../clang/lib/APINotes/APINotesYAMLCompiler.cpp | 598 +++ .../llvm-project/clang/lib/ARCMigrate/ARCMT.cpp | 8 +- .../clang/lib/ARCMigrate/FileRemapper.cpp | 15 + .../llvm-project/clang/lib/ARCMigrate/ObjCMT.cpp | 39 +- .../clang/lib/ARCMigrate/TransGCAttrs.cpp | 22 +- .../clang/lib/ARCMigrate/TransProperties.cpp | 17 +- .../llvm-project/clang/lib/ARCMigrate/Transforms.h | 6 +- contrib/llvm-project/clang/lib/AST/APValue.cpp | 538 +- contrib/llvm-project/clang/lib/AST/ASTContext.cpp | 441 +- .../llvm-project/clang/lib/AST/ASTDiagnostic.cpp | 15 +- contrib/llvm-project/clang/lib/AST/ASTDumper.cpp | 8 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 561 ++- .../clang/lib/AST/ASTImporterLookupTable.cpp | 14 + .../clang/lib/AST/ASTStructuralEquivalence.cpp | 496 +- .../llvm-project/clang/lib/AST/ASTTypeTraits.cpp | 58 +- contrib/llvm-project/clang/lib/AST/AttrImpl.cpp | 53 +- .../llvm-project/clang/lib/AST/CXXInheritance.cpp | 150 +- .../llvm-project/clang/lib/AST/CommentLexer.cpp | 9 +- .../clang/lib/AST/ComparisonCategories.cpp | 2 +- .../clang/lib/AST/ComputeDependence.cpp | 138 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 329 +- contrib/llvm-project/clang/lib/AST/DeclBase.cpp | 58 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 131 +- contrib/llvm-project/clang/lib/AST/DeclObjC.cpp | 45 +- contrib/llvm-project/clang/lib/AST/DeclOpenMP.cpp | 112 +- contrib/llvm-project/clang/lib/AST/DeclPrinter.cpp | 28 +- .../llvm-project/clang/lib/AST/DeclTemplate.cpp | 77 +- contrib/llvm-project/clang/lib/AST/Expr.cpp | 482 +- contrib/llvm-project/clang/lib/AST/ExprCXX.cpp | 207 +- .../clang/lib/AST/ExprClassification.cpp | 4 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 1533 ++++-- .../llvm-project/clang/lib/AST/Interp/Disasm.cpp | 4 +- .../llvm-project/clang/lib/AST/Interp/State.cpp | 2 +- .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 1046 +++- .../llvm-project/clang/lib/AST/JSONNodeDumper.cpp | 8 +- contrib/llvm-project/clang/lib/AST/Linkage.h | 2 + contrib/llvm-project/clang/lib/AST/Mangle.cpp | 72 +- .../llvm-project/clang/lib/AST/MicrosoftMangle.cpp | 424 +- contrib/llvm-project/clang/lib/AST/NSAPI.cpp | 3 + .../llvm-project/clang/lib/AST/OpenMPClause.cpp | 178 +- .../clang/lib/AST/ParentMapContext.cpp | 117 +- .../clang/lib/AST/PrintfFormatString.cpp | 3 + .../llvm-project/clang/lib/AST/RecordLayout.cpp | 41 +- .../clang/lib/AST/RecordLayoutBuilder.cpp | 380 +- contrib/llvm-project/clang/lib/AST/Stmt.cpp | 110 +- contrib/llvm-project/clang/lib/AST/StmtOpenMP.cpp | 1135 ++--- contrib/llvm-project/clang/lib/AST/StmtPrinter.cpp | 25 +- contrib/llvm-project/clang/lib/AST/StmtProfile.cpp | 9 +- .../llvm-project/clang/lib/AST/TemplateBase.cpp | 35 +- .../llvm-project/clang/lib/AST/TemplateName.cpp | 18 +- .../llvm-project/clang/lib/AST/TextNodeDumper.cpp | 51 +- contrib/llvm-project/clang/lib/AST/Type.cpp | 108 +- contrib/llvm-project/clang/lib/AST/TypeLoc.cpp | 5 +- contrib/llvm-project/clang/lib/AST/TypePrinter.cpp | 314 +- .../clang/lib/ASTMatchers/ASTMatchFinder.cpp | 447 +- .../clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 152 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.cpp | 11 +- .../clang/lib/ASTMatchers/Dynamic/Marshallers.h | 208 +- .../clang/lib/ASTMatchers/Dynamic/Registry.cpp | 11 +- .../clang/lib/ASTMatchers/Dynamic/VariantValue.cpp | 30 + .../clang/lib/ASTMatchers/GtestMatchers.cpp | 4 +- .../llvm-project/clang/lib/Analysis/BodyFarm.cpp | 40 +- contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 35 +- .../clang/lib/Analysis/CalledOnceCheck.cpp | 1525 ++++++ .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 300 +- .../Core => Analysis}/IssueHash.cpp | 41 +- .../clang/lib/Analysis/LiveVariables.cpp | 102 +- .../clang/lib/Analysis/PathDiagnostic.cpp | 46 +- .../clang/lib/Analysis/ThreadSafety.cpp | 29 +- .../clang/lib/Analysis/ThreadSafetyCommon.cpp | 4 +- contrib/llvm-project/clang/lib/Basic/Cuda.cpp | 43 +- .../llvm-project/clang/lib/Basic/Diagnostic.cpp | 35 +- .../llvm-project/clang/lib/Basic/DiagnosticIDs.cpp | 109 +- contrib/llvm-project/clang/lib/Basic/FileEntry.cpp | 24 + .../llvm-project/clang/lib/Basic/FileManager.cpp | 181 +- .../clang/lib/Basic/IdentifierTable.cpp | 5 + .../llvm-project/clang/lib/Basic/LangOptions.cpp | 2 +- contrib/llvm-project/clang/lib/Basic/Module.cpp | 21 +- .../llvm-project/clang/lib/Basic/OpenCLOptions.cpp | 106 + .../llvm-project/clang/lib/Basic/OpenMPKinds.cpp | 50 +- .../llvm-project/clang/lib/Basic/ProfileList.cpp | 113 + .../clang/lib/Basic/SourceLocation.cpp | 21 +- .../llvm-project/clang/lib/Basic/SourceManager.cpp | 506 +- contrib/llvm-project/clang/lib/Basic/TargetID.cpp | 169 + .../llvm-project/clang/lib/Basic/TargetInfo.cpp | 1 + contrib/llvm-project/clang/lib/Basic/Targets.cpp | 51 +- .../clang/lib/Basic/Targets/AArch64.cpp | 48 +- .../llvm-project/clang/lib/Basic/Targets/AArch64.h | 6 + .../clang/lib/Basic/Targets/AMDGPU.cpp | 36 +- .../llvm-project/clang/lib/Basic/Targets/AMDGPU.h | 77 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 2 + .../llvm-project/clang/lib/Basic/Targets/AVR.cpp | 7 + .../clang/lib/Basic/Targets/Hexagon.cpp | 3 +- .../clang/lib/Basic/Targets/MSP430.cpp | 1 + .../llvm-project/clang/lib/Basic/Targets/Mips.cpp | 1 - .../llvm-project/clang/lib/Basic/Targets/NVPTX.cpp | 8 + .../llvm-project/clang/lib/Basic/Targets/NVPTX.h | 22 +- .../clang/lib/Basic/Targets/OSTargets.h | 76 +- .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 87 +- contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 34 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 131 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.h | 34 +- .../llvm-project/clang/lib/Basic/Targets/SPIR.h | 6 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.cpp | 23 +- .../llvm-project/clang/lib/Basic/Targets/Sparc.h | 11 +- .../llvm-project/clang/lib/Basic/Targets/SystemZ.h | 4 + contrib/llvm-project/clang/lib/Basic/Targets/TCE.h | 2 + contrib/llvm-project/clang/lib/Basic/Targets/VE.h | 16 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 59 +- contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 36 +- contrib/llvm-project/clang/lib/Basic/Version.cpp | 2 - contrib/llvm-project/clang/lib/Basic/Warnings.cpp | 7 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 2 +- .../llvm-project/clang/lib/CodeGen/BackendUtil.cpp | 560 +-- .../llvm-project/clang/lib/CodeGen/CGAtomic.cpp | 60 +- .../llvm-project/clang/lib/CodeGen/CGBlocks.cpp | 17 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 2357 ++++++--- .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 109 +- .../llvm-project/clang/lib/CodeGen/CGCUDARuntime.h | 7 +- .../llvm-project/clang/lib/CodeGen/CGCXXABI.cpp | 26 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 13 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 339 +- contrib/llvm-project/clang/lib/CodeGen/CGCall.h | 6 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 103 +- contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h | 1 + .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 269 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.h | 14 +- contrib/llvm-project/clang/lib/CodeGen/CGDecl.cpp | 158 +- .../llvm-project/clang/lib/CodeGen/CGDeclCXX.cpp | 113 +- .../llvm-project/clang/lib/CodeGen/CGException.cpp | 28 +- contrib/llvm-project/clang/lib/CodeGen/CGExpr.cpp | 244 +- .../llvm-project/clang/lib/CodeGen/CGExprAgg.cpp | 131 +- .../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 28 +- .../clang/lib/CodeGen/CGExprComplex.cpp | 11 +- .../clang/lib/CodeGen/CGExprConstant.cpp | 34 +- .../clang/lib/CodeGen/CGExprScalar.cpp | 440 +- .../llvm-project/clang/lib/CodeGen/CGLoopInfo.cpp | 93 +- .../llvm-project/clang/lib/CodeGen/CGLoopInfo.h | 15 +- contrib/llvm-project/clang/lib/CodeGen/CGObjC.cpp | 243 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 54 +- .../llvm-project/clang/lib/CodeGen/CGObjCMac.cpp | 98 +- .../clang/lib/CodeGen/CGObjCRuntime.cpp | 10 + .../llvm-project/clang/lib/CodeGen/CGObjCRuntime.h | 14 + .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 1843 +++++-- .../clang/lib/CodeGen/CGOpenMPRuntime.h | 69 +- .../clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp | 60 + .../clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.h | 43 + .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 4864 ++++++++++++++++++ .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 504 ++ .../clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 5233 +------------------ .../clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h | 465 +- .../clang/lib/CodeGen/CGRecordLayout.h | 17 +- .../clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 187 +- contrib/llvm-project/clang/lib/CodeGen/CGStmt.cpp | 301 +- .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 205 +- contrib/llvm-project/clang/lib/CodeGen/CGVTT.cpp | 13 +- .../llvm-project/clang/lib/CodeGen/CGVTables.cpp | 96 +- contrib/llvm-project/clang/lib/CodeGen/CGValue.h | 2 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 220 +- .../clang/lib/CodeGen/CodeGenFunction.cpp | 350 +- .../clang/lib/CodeGen/CodeGenFunction.h | 257 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 398 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 58 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.cpp | 55 +- .../llvm-project/clang/lib/CodeGen/CodeGenPGO.h | 2 +- .../clang/lib/CodeGen/CodeGenTypeCache.h | 3 + .../clang/lib/CodeGen/CodeGenTypes.cpp | 22 +- .../clang/lib/CodeGen/CoverageMappingGen.cpp | 350 +- .../clang/lib/CodeGen/CoverageMappingGen.h | 50 +- .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 183 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 103 +- .../CodeGen/ObjectFilePCHContainerOperations.cpp | 10 +- .../clang/lib/CodeGen/SwiftCallingConv.cpp | 33 +- .../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 608 +-- .../llvm-project/clang/lib/CodeGen/TargetInfo.h | 8 +- .../clang/lib/CrossTU/CrossTranslationUnit.cpp | 12 +- .../llvm-project/clang/lib/Driver/Compilation.cpp | 2 + contrib/llvm-project/clang/lib/Driver/Distro.cpp | 180 +- contrib/llvm-project/clang/lib/Driver/Driver.cpp | 347 +- contrib/llvm-project/clang/lib/Driver/Job.cpp | 22 +- .../clang/lib/Driver/SanitizerArgs.cpp | 42 +- .../llvm-project/clang/lib/Driver/ToolChain.cpp | 139 +- .../clang/lib/Driver/ToolChains/AIX.cpp | 62 +- .../llvm-project/clang/lib/Driver/ToolChains/AIX.h | 7 + .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 135 +- .../clang/lib/Driver/ToolChains/AMDGPU.h | 14 +- .../clang/lib/Driver/ToolChains/AVR.cpp | 306 +- .../clang/lib/Driver/ToolChains/Ananas.cpp | 10 +- .../clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 20 +- .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 261 +- .../clang/lib/Driver/ToolChains/Arch/ARM.h | 2 + .../clang/lib/Driver/ToolChains/Arch/Mips.cpp | 2 - .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 1 - .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 40 +- .../clang/lib/Driver/ToolChains/Arch/VE.cpp | 4 - .../clang/lib/Driver/ToolChains/Arch/VE.h | 2 - .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 29 +- .../clang/lib/Driver/ToolChains/Arch/X86.h | 2 +- .../clang/lib/Driver/ToolChains/BareMetal.cpp | 146 +- .../clang/lib/Driver/ToolChains/BareMetal.h | 15 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 649 ++- .../clang/lib/Driver/ToolChains/CloudABI.cpp | 5 +- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 244 +- .../clang/lib/Driver/ToolChains/CommonArgs.h | 10 +- .../clang/lib/Driver/ToolChains/CrossWindows.cpp | 15 +- .../clang/lib/Driver/ToolChains/CrossWindows.h | 6 +- .../clang/lib/Driver/ToolChains/Cuda.cpp | 102 +- .../clang/lib/Driver/ToolChains/Cuda.h | 6 +- .../clang/lib/Driver/ToolChains/Darwin.cpp | 132 +- .../clang/lib/Driver/ToolChains/Darwin.h | 21 +- .../clang/lib/Driver/ToolChains/DragonFly.cpp | 16 +- .../clang/lib/Driver/ToolChains/Flang.cpp | 44 +- .../clang/lib/Driver/ToolChains/Flang.h | 9 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 18 +- .../clang/lib/Driver/ToolChains/Fuchsia.cpp | 29 +- .../clang/lib/Driver/ToolChains/Fuchsia.h | 6 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 154 +- .../llvm-project/clang/lib/Driver/ToolChains/Gnu.h | 6 +- .../clang/lib/Driver/ToolChains/HIP.cpp | 56 +- .../clang/lib/Driver/ToolChains/Hexagon.cpp | 10 +- .../clang/lib/Driver/ToolChains/InterfaceStubs.cpp | 2 +- .../clang/lib/Driver/ToolChains/Linux.cpp | 36 +- .../clang/lib/Driver/ToolChains/MSP430.cpp | 159 +- .../clang/lib/Driver/ToolChains/MSP430.h | 13 + .../clang/lib/Driver/ToolChains/MSVC.cpp | 65 +- .../clang/lib/Driver/ToolChains/MinGW.cpp | 25 +- .../clang/lib/Driver/ToolChains/Minix.cpp | 10 +- .../clang/lib/Driver/ToolChains/Myriad.cpp | 10 +- .../clang/lib/Driver/ToolChains/NaCl.cpp | 5 +- .../clang/lib/Driver/ToolChains/NetBSD.cpp | 10 +- .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 10 +- .../clang/lib/Driver/ToolChains/OpenBSD.h | 6 +- .../clang/lib/Driver/ToolChains/PS4CPU.cpp | 47 +- .../clang/lib/Driver/ToolChains/PS4CPU.h | 6 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.cpp | 21 +- .../clang/lib/Driver/ToolChains/RISCVToolchain.h | 1 + .../clang/lib/Driver/ToolChains/ROCm.h | 13 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 4 +- .../clang/lib/Driver/ToolChains/Solaris.h | 5 + .../clang/lib/Driver/ToolChains/VEToolchain.cpp | 31 +- .../clang/lib/Driver/ToolChains/VEToolchain.h | 1 + .../clang/lib/Driver/ToolChains/WebAssembly.cpp | 28 +- .../clang/lib/Driver/ToolChains/XCore.cpp | 4 +- .../clang/lib/Driver/ToolChains/ZOS.cpp | 33 + .../llvm-project/clang/lib/Driver/ToolChains/ZOS.h | 40 + contrib/llvm-project/clang/lib/Driver/Types.cpp | 4 +- contrib/llvm-project/clang/lib/Driver/XRayArgs.cpp | 26 + .../llvm-project/clang/lib/Edit/EditedSource.cpp | 4 +- .../clang/lib/Edit/RewriteObjCFoundationAPI.cpp | 2 + .../clang/lib/Format/BreakableToken.cpp | 92 +- .../llvm-project/clang/lib/Format/BreakableToken.h | 1 - .../clang/lib/Format/ContinuationIndenter.cpp | 59 +- contrib/llvm-project/clang/lib/Format/Format.cpp | 167 +- .../llvm-project/clang/lib/Format/FormatInternal.h | 1 - .../llvm-project/clang/lib/Format/FormatToken.cpp | 5 +- .../llvm-project/clang/lib/Format/FormatToken.h | 279 +- .../clang/lib/Format/FormatTokenLexer.cpp | 23 +- .../clang/lib/Format/MacroExpander.cpp | 224 + contrib/llvm-project/clang/lib/Format/Macros.h | 141 + .../clang/lib/Format/TokenAnnotator.cpp | 243 +- .../clang/lib/Format/UnwrappedLineFormatter.cpp | 71 +- .../clang/lib/Format/UnwrappedLineParser.cpp | 250 +- .../clang/lib/Format/UnwrappedLineParser.h | 5 + .../clang/lib/Format/WhitespaceManager.cpp | 86 +- .../llvm-project/clang/lib/Frontend/ASTUnit.cpp | 103 +- .../clang/lib/Frontend/ChainedIncludesSource.cpp | 11 +- .../clang/lib/Frontend/CompilerInstance.cpp | 280 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 2171 +++----- .../Frontend/CreateInvocationFromCommandLine.cpp | 4 +- .../clang/lib/Frontend/DependencyFile.cpp | 17 +- .../clang/lib/Frontend/FrontendAction.cpp | 19 +- .../clang/lib/Frontend/FrontendActions.cpp | 58 +- .../clang/lib/Frontend/FrontendOptions.cpp | 2 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 32 +- .../lib/Frontend/ModuleDependencyCollector.cpp | 52 +- .../clang/lib/Frontend/PrecompiledPreamble.cpp | 51 +- .../clang/lib/Frontend/Rewrite/HTMLPrint.cpp | 2 +- .../lib/Frontend/Rewrite/InclusionRewriter.cpp | 78 +- .../clang/lib/Frontend/Rewrite/RewriteMacros.cpp | 2 +- .../lib/Frontend/Rewrite/RewriteModernObjC.cpp | 57 +- .../clang/lib/Frontend/Rewrite/RewriteObjC.cpp | 47 +- .../clang/lib/Frontend/TextDiagnostic.cpp | 5 +- .../clang/lib/Frontend/TextDiagnosticPrinter.cpp | 8 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 12 +- .../clang/lib/Headers/__clang_cuda_builtin_vars.h | 9 + .../clang/lib/Headers/__clang_cuda_cmath.h | 50 +- .../lib/Headers/__clang_cuda_complex_builtins.h | 30 +- .../clang/lib/Headers/__clang_cuda_math.h | 9 +- .../Headers/__clang_cuda_math_forward_declares.h | 3 + .../lib/Headers/__clang_cuda_runtime_wrapper.h | 28 +- .../clang/lib/Headers/__clang_hip_cmath.h | 664 +++ .../lib/Headers/__clang_hip_libdevice_declares.h | 26 +- .../clang/lib/Headers/__clang_hip_math.h | 1148 +++-- .../lib/Headers/__clang_hip_runtime_wrapper.h | 5 + contrib/llvm-project/clang/lib/Headers/altivec.h | 1037 +++- contrib/llvm-project/clang/lib/Headers/amxintrin.h | 97 +- contrib/llvm-project/clang/lib/Headers/arm_acle.h | 26 + .../llvm-project/clang/lib/Headers/avx512fintrin.h | 157 +- .../clang/lib/Headers/avx512vlvnniintrin.h | 205 +- contrib/llvm-project/clang/lib/Headers/avxintrin.h | 6 +- .../llvm-project/clang/lib/Headers/avxvnniintrin.h | 225 + contrib/llvm-project/clang/lib/Headers/cpuid.h | 8 + .../clang/lib/Headers/cuda_wrappers/algorithm | 2 +- .../clang/lib/Headers/cuda_wrappers/new | 2 +- contrib/llvm-project/clang/lib/Headers/emmintrin.h | 2 +- .../llvm-project/clang/lib/Headers/gfniintrin.h | 181 +- .../llvm-project/clang/lib/Headers/hresetintrin.h | 49 + .../llvm-project/clang/lib/Headers/ia32intrin.h | 97 +- contrib/llvm-project/clang/lib/Headers/immintrin.h | 12 + contrib/llvm-project/clang/lib/Headers/intrin.h | 24 +- .../clang/lib/Headers/keylockerintrin.h | 506 ++ contrib/llvm-project/clang/lib/Headers/mm_malloc.h | 6 + .../llvm-project/clang/lib/Headers/opencl-c-base.h | 18 + contrib/llvm-project/clang/lib/Headers/opencl-c.h | 2 + .../clang/lib/Headers/openmp_wrappers/cmath | 5 +- .../clang/lib/Headers/openmp_wrappers/complex | 25 + .../lib/Headers/openmp_wrappers/complex_cmath.h | 388 ++ .../llvm-project/clang/lib/Headers/popcntintrin.h | 11 +- .../clang/lib/Headers/ppc_wrappers/smmintrin.h | 24 + .../llvm-project/clang/lib/Headers/uintrintrin.h | 150 + .../llvm-project/clang/lib/Headers/wasm_simd128.h | 112 +- .../llvm-project/clang/lib/Headers/x86gprintrin.h | 23 + .../clang/lib/Index/FileIndexRecord.cpp | 2 +- contrib/llvm-project/clang/lib/Index/IndexBody.cpp | 4 +- .../clang/lib/Index/IndexTypeSourceInfo.cpp | 21 + .../clang/lib/Index/IndexingAction.cpp | 11 +- .../clang/lib/Index/SimpleFormatContext.h | 72 - .../llvm-project/clang/lib/Index/USRGeneration.cpp | 3 + .../SerializablePathCollection.cpp | 91 + .../llvm-project/clang/lib/Lex/HeaderSearch.cpp | 58 +- contrib/llvm-project/clang/lib/Lex/Lexer.cpp | 49 +- .../llvm-project/clang/lib/Lex/LiteralSupport.cpp | 4 +- contrib/llvm-project/clang/lib/Lex/ModuleMap.cpp | 76 +- .../llvm-project/clang/lib/Lex/PPDirectives.cpp | 12 +- .../llvm-project/clang/lib/Lex/PPLexerChange.cpp | 27 +- .../clang/lib/Lex/PPMacroExpansion.cpp | 31 +- contrib/llvm-project/clang/lib/Lex/Pragma.cpp | 2 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 16 +- .../llvm-project/clang/lib/Lex/ScratchBuffer.cpp | 8 +- contrib/llvm-project/clang/lib/Lex/TokenLexer.cpp | 10 +- .../clang/lib/Parse/ParseCXXInlineMethods.cpp | 23 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 300 +- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 107 +- contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 96 +- .../llvm-project/clang/lib/Parse/ParseExprCXX.cpp | 71 +- contrib/llvm-project/clang/lib/Parse/ParseObjc.cpp | 37 +- .../llvm-project/clang/lib/Parse/ParseOpenMP.cpp | 456 +- .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 311 +- contrib/llvm-project/clang/lib/Parse/ParseStmt.cpp | 57 +- .../llvm-project/clang/lib/Parse/ParseStmtAsm.cpp | 2 +- .../llvm-project/clang/lib/Parse/ParseTemplate.cpp | 21 +- .../clang/lib/Parse/ParseTentative.cpp | 13 +- contrib/llvm-project/clang/lib/Parse/Parser.cpp | 66 +- .../llvm-project/clang/lib/Rewrite/HTMLRewrite.cpp | 22 +- .../llvm-project/clang/lib/Rewrite/Rewriter.cpp | 8 +- .../clang/lib/Rewrite/TokenRewriter.cpp | 2 +- .../clang/lib/Sema/AnalysisBasedWarnings.cpp | 102 +- .../clang/lib/Sema/CodeCompleteConsumer.cpp | 6 +- contrib/llvm-project/clang/lib/Sema/DeclSpec.cpp | 167 +- .../clang/lib/Sema/JumpDiagnostics.cpp | 17 + .../clang/lib/Sema/MultiplexExternalSemaSource.cpp | 7 - contrib/llvm-project/clang/lib/Sema/ScopeInfo.cpp | 1 + contrib/llvm-project/clang/lib/Sema/Sema.cpp | 163 +- contrib/llvm-project/clang/lib/Sema/SemaAccess.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaAttr.cpp | 345 +- contrib/llvm-project/clang/lib/Sema/SemaCUDA.cpp | 103 +- contrib/llvm-project/clang/lib/Sema/SemaCast.cpp | 81 +- .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 1019 +++- .../clang/lib/Sema/SemaCodeComplete.cpp | 90 +- .../llvm-project/clang/lib/Sema/SemaConcept.cpp | 23 +- .../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 100 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 1054 ++-- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 1054 +++- .../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 225 +- .../llvm-project/clang/lib/Sema/SemaDeclObjC.cpp | 76 +- .../clang/lib/Sema/SemaExceptionSpec.cpp | 4 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 1002 ++-- .../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 176 +- .../llvm-project/clang/lib/Sema/SemaExprMember.cpp | 119 +- .../llvm-project/clang/lib/Sema/SemaExprObjC.cpp | 88 +- contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 356 +- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 142 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 371 +- contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 2 +- .../clang/lib/Sema/SemaObjCProperty.cpp | 14 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 1041 ++-- .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 978 ++-- contrib/llvm-project/clang/lib/Sema/SemaSYCL.cpp | 20 +- contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 217 +- .../llvm-project/clang/lib/Sema/SemaStmtAsm.cpp | 6 +- .../llvm-project/clang/lib/Sema/SemaStmtAttr.cpp | 78 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 636 ++- .../clang/lib/Sema/SemaTemplateDeduction.cpp | 372 +- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 187 +- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 403 +- .../clang/lib/Sema/SemaTemplateVariadic.cpp | 60 +- contrib/llvm-project/clang/lib/Sema/SemaType.cpp | 1104 +++-- .../llvm-project/clang/lib/Sema/TreeTransform.h | 205 +- .../clang/lib/Serialization/ASTCommon.cpp | 6 + .../clang/lib/Serialization/ASTReader.cpp | 422 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 156 +- .../clang/lib/Serialization/ASTReaderStmt.cpp | 365 +- .../clang/lib/Serialization/ASTWriter.cpp | 177 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 59 +- .../clang/lib/Serialization/ASTWriterStmt.cpp | 158 +- .../clang/lib/Serialization/GlobalModuleIndex.cpp | 7 +- .../clang/lib/Serialization/ModuleManager.cpp | 61 +- .../Checkers/BasicObjCFoundationChecks.cpp | 3 +- .../StaticAnalyzer/Checkers/CastValueChecker.cpp | 4 +- .../StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 2 +- .../lib/StaticAnalyzer/Checkers/DebugCheckers.cpp | 10 +- .../StaticAnalyzer/Checkers/DereferenceChecker.cpp | 69 +- .../Checkers/ExprInspectionChecker.cpp | 4 +- .../Checkers/FuchsiaHandleChecker.cpp | 312 +- .../Checkers/GenericTaintChecker.cpp | 5 +- .../StaticAnalyzer/Checkers/IteratorModeling.cpp | 103 +- .../Checkers/IteratorRangeChecker.cpp | 2 + .../Checkers/LocalizationChecker.cpp | 7 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 2 +- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 15 +- .../lib/StaticAnalyzer/Checkers/MoveChecker.cpp | 4 +- .../StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp | 21 +- .../Checkers/ObjCMissingSuperCallChecker.cpp | 7 +- .../lib/StaticAnalyzer/Checkers/PaddingChecker.cpp | 5 +- .../StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 271 +- .../RetainCountChecker/RetainCountDiagnostics.cpp | 4 +- .../Checkers/ReturnPointerRangeChecker.cpp | 7 +- .../clang/lib/StaticAnalyzer/Checkers/SmartPtr.h | 2 + .../StaticAnalyzer/Checkers/SmartPtrChecker.cpp | 48 +- .../StaticAnalyzer/Checkers/SmartPtrModeling.cpp | 514 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 2058 +++++--- .../lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 70 +- .../clang/lib/StaticAnalyzer/Checkers/Taint.cpp | 2 +- .../StaticAnalyzer/Checkers/UndefBranchChecker.cpp | 7 +- .../StaticAnalyzer/Checkers/VirtualCallChecker.cpp | 4 +- .../StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp | 4 +- .../Checkers/WebKit/NoUncountedMembersChecker.cpp | 7 +- .../Checkers/WebKit/PtrTypesSemantics.cpp | 58 +- .../Checkers/WebKit/PtrTypesSemantics.h | 23 +- .../WebKit/RefCntblBaseVirtualDtorChecker.cpp | 12 +- .../Checkers/WebKit/UncountedCallArgsChecker.cpp | 3 +- .../WebKit/UncountedLambdaCapturesChecker.cpp | 107 + .../Checkers/WebKit/UncountedLocalVarsChecker.cpp | 251 + .../lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 2 +- .../lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 25 +- .../clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 13 +- .../StaticAnalyzer/Core/BugReporterVisitors.cpp | 7 +- .../clang/lib/StaticAnalyzer/Core/CallEvent.cpp | 2 +- .../lib/StaticAnalyzer/Core/CheckerContext.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/Environment.cpp | 21 +- .../clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 153 +- .../clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 7 +- .../lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 26 +- .../Core/ExprEngineCallAndReturn.cpp | 14 +- .../lib/StaticAnalyzer/Core/ExprEngineObjC.cpp | 13 +- .../lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 47 +- .../lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 400 +- .../clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 3 - .../StaticAnalyzer/Core/RangeConstraintManager.cpp | 1114 ++++- .../Core/RangedConstraintManager.cpp | 41 +- .../clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | 23 +- .../clang/lib/StaticAnalyzer/Core/SVals.cpp | 48 +- .../lib/StaticAnalyzer/Core/SarifDiagnostics.cpp | 16 +- .../Core/SimpleConstraintManager.cpp | 4 +- .../lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 19 +- .../lib/StaticAnalyzer/Core/SymbolManager.cpp | 28 +- .../lib/StaticAnalyzer/Core/TextDiagnostics.cpp | 49 +- .../StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 4 +- .../clang/lib/Tooling/AllTUsExecution.cpp | 2 +- .../clang/lib/Tooling/ArgumentsAdjusters.cpp | 34 +- .../clang/lib/Tooling/CompilationDatabase.cpp | 58 +- .../clang/lib/Tooling/Core/Replacement.cpp | 2 +- .../DependencyScanningFilesystem.cpp | 20 +- .../DependencyScanningWorker.cpp | 24 +- .../DependencyScanning/ModuleDepCollector.cpp | 13 +- .../clang/lib/Tooling/FileMatchTrie.cpp | 14 +- .../lib/Tooling/Inclusions/HeaderIncludes.cpp | 52 +- .../clang/lib/Tooling/Inclusions/IncludeStyle.cpp | 1 + .../clang/lib/Tooling/JSONCompilationDatabase.cpp | 48 +- .../clang/lib/Tooling/Refactoring/ASTSelection.cpp | 2 +- .../lib/Tooling/{Core => Refactoring}/Lookup.cpp | 2 +- .../lib/Tooling/Refactoring/RefactoringActions.cpp | 4 +- .../Refactoring/Rename/SymbolOccurrences.cpp | 5 +- .../lib/Tooling/Refactoring/Rename/USRFinder.cpp | 4 +- .../Refactoring/Rename/USRFindingAction.cpp | 52 +- .../Tooling/Refactoring/Rename/USRLocFinder.cpp | 2 +- .../clang/lib/Tooling/Syntax/BuildTree.cpp | 819 ++- .../lib/Tooling/Syntax/ComputeReplacements.cpp | 15 +- .../clang/lib/Tooling/Syntax/Mutations.cpp | 36 +- .../clang/lib/Tooling/Syntax/Nodes.cpp | 604 +-- .../clang/lib/Tooling/Syntax/Synthesis.cpp | 224 +- .../clang/lib/Tooling/Syntax/Tokens.cpp | 89 +- .../llvm-project/clang/lib/Tooling/Syntax/Tree.cpp | 412 +- contrib/llvm-project/clang/lib/Tooling/Tooling.cpp | 71 +- .../clang/lib/Tooling/Transformer/Parsing.cpp | 8 +- .../lib/Tooling/Transformer/RangeSelector.cpp | 26 +- .../clang/lib/Tooling/Transformer/RewriteRule.cpp | 262 +- .../clang/lib/Tooling/Transformer/Stencil.cpp | 77 +- .../clang/lib/Tooling/Transformer/Transformer.cpp | 42 +- .../clang/tools/clang-format/ClangFormat.cpp | 32 +- .../llvm-project/clang/tools/driver/cc1_main.cpp | 10 +- .../llvm-project/clang/tools/driver/cc1as_main.cpp | 29 +- contrib/llvm-project/clang/tools/driver/driver.cpp | 7 + .../utils/TableGen/ClangASTPropertiesEmitter.cpp | 12 +- .../clang/utils/TableGen/ClangAttrEmitter.cpp | 56 +- .../utils/TableGen/ClangDiagnosticsEmitter.cpp | 5 + .../clang/utils/TableGen/ClangOptionDocEmitter.cpp | 2 - .../clang/utils/TableGen/ClangSyntaxEmitter.cpp | 236 + .../clang/utils/TableGen/NeonEmitter.cpp | 25 +- .../clang/utils/TableGen/SveEmitter.cpp | 20 +- .../llvm-project/clang/utils/TableGen/TableGen.cpp | 12 + .../clang/utils/TableGen/TableGenBackends.h | 8 +- contrib/llvm-project/compiler-rt/.clang-tidy | 2 + .../include/fuzzer/FuzzedDataProvider.h | 9 + .../compiler-rt/include/profile/InstrProfData.inc | 139 +- .../compiler-rt/include/sanitizer/asan_interface.h | 16 +- .../include/sanitizer/common_interface_defs.h | 9 +- .../include/sanitizer/dfsan_interface.h | 8 +- .../include/sanitizer/hwasan_interface.h | 3 + .../include/sanitizer/memprof_interface.h | 65 + .../compiler-rt/include/sanitizer/msan_interface.h | 3 + .../include/sanitizer/netbsd_syscall_hooks.h | 213 +- .../compiler-rt/lib/asan/asan_allocator.cpp | 479 +- .../compiler-rt/lib/asan/asan_allocator.h | 11 +- .../compiler-rt/lib/asan/asan_flags.cpp | 10 +- .../compiler-rt/lib/asan/asan_fuchsia.cpp | 35 +- .../compiler-rt/lib/asan/asan_interceptors.cpp | 41 +- .../compiler-rt/lib/asan/asan_interceptors.h | 22 +- .../compiler-rt/lib/asan/asan_interceptors_vfork.S | 3 +- .../compiler-rt/lib/asan/asan_interface_internal.h | 4 +- .../compiler-rt/lib/asan/asan_internal.h | 2 - .../compiler-rt/lib/asan/asan_linux.cpp | 45 +- .../llvm-project/compiler-rt/lib/asan/asan_mac.cpp | 48 +- .../compiler-rt/lib/asan/asan_malloc_linux.cpp | 10 +- .../compiler-rt/lib/asan/asan_malloc_local.h | 2 +- .../compiler-rt/lib/asan/asan_mapping.h | 21 + .../compiler-rt/lib/asan/asan_poisoning.cpp | 6 - .../compiler-rt/lib/asan/asan_premap_shadow.cpp | 18 +- .../compiler-rt/lib/asan/asan_report.cpp | 5 +- .../compiler-rt/lib/asan/asan_rtems.cpp | 6 + .../llvm-project/compiler-rt/lib/asan/asan_rtl.cpp | 5 +- .../compiler-rt/lib/asan/asan_shadow_setup.cpp | 45 +- .../llvm-project/compiler-rt/lib/asan/asan_stack.h | 5 - .../compiler-rt/lib/asan/asan_thread.cpp | 27 +- .../compiler-rt/lib/asan/asan_thread.h | 7 +- .../llvm-project/compiler-rt/lib/asan/asan_win.cpp | 19 +- .../compiler-rt/lib/builtins/README.txt | 2 + .../compiler-rt/lib/builtins/aarch64/lse.S | 236 + .../compiler-rt/lib/builtins/assembly.h | 93 +- .../llvm-project/compiler-rt/lib/builtins/atomic.c | 93 +- .../compiler-rt/lib/builtins/clear_cache.c | 10 +- .../compiler-rt/lib/builtins/cpu_model.c | 63 +- .../llvm-project/compiler-rt/lib/builtins/divdf3.c | 189 +- .../llvm-project/compiler-rt/lib/builtins/divdi3.c | 15 +- .../compiler-rt/lib/builtins/divmoddi4.c | 13 +- .../compiler-rt/lib/builtins/divmodsi4.c | 13 +- .../compiler-rt/lib/builtins/divmodti4.c | 32 + .../llvm-project/compiler-rt/lib/builtins/divsf3.c | 174 +- .../llvm-project/compiler-rt/lib/builtins/divsi3.c | 25 +- .../llvm-project/compiler-rt/lib/builtins/divtf3.c | 203 +- .../llvm-project/compiler-rt/lib/builtins/divti3.c | 15 +- .../llvm-project/compiler-rt/lib/builtins/emutls.c | 7 +- .../compiler-rt/lib/builtins/extendhfsf2.c | 6 +- .../compiler-rt/lib/builtins/extendhftf2.c | 23 + .../compiler-rt/lib/builtins/fp_div_impl.inc | 419 ++ .../compiler-rt/lib/builtins/fp_extend.h | 4 + .../llvm-project/compiler-rt/lib/builtins/fp_lib.h | 7 + .../compiler-rt/lib/builtins/fp_trunc.h | 4 + .../compiler-rt/lib/builtins/int_div_impl.inc | 25 + .../compiler-rt/lib/builtins/int_mulo_impl.inc | 49 + .../compiler-rt/lib/builtins/int_mulv_impl.inc | 47 + .../compiler-rt/lib/builtins/int_util.h | 16 + .../llvm-project/compiler-rt/lib/builtins/moddi3.c | 16 +- .../llvm-project/compiler-rt/lib/builtins/modti3.c | 16 +- .../compiler-rt/lib/builtins/mulodi4.c | 33 +- .../compiler-rt/lib/builtins/mulosi4.c | 33 +- .../compiler-rt/lib/builtins/muloti4.c | 33 +- .../compiler-rt/lib/builtins/mulvdi3.c | 33 +- .../compiler-rt/lib/builtins/mulvsi3.c | 33 +- .../compiler-rt/lib/builtins/mulvti3.c | 33 +- .../compiler-rt/lib/builtins/os_version_check.c | 108 +- .../compiler-rt/lib/builtins/paritydi2.c | 6 +- .../compiler-rt/lib/builtins/parityti2.c | 8 +- .../lib/builtins/riscv/int_mul_impl.inc | 6 +- .../compiler-rt/lib/builtins/truncdfhf2.c | 4 +- .../compiler-rt/lib/builtins/truncsfhf2.c | 6 +- .../compiler-rt/lib/builtins/trunctfhf2.c | 23 + contrib/llvm-project/compiler-rt/lib/cfi/cfi.cpp | 2 +- .../llvm-project/compiler-rt/lib/crt/crtbegin.c | 8 + .../llvm-project/compiler-rt/lib/dfsan/dfsan.cpp | 100 +- .../compiler-rt/lib/dfsan/dfsan_custom.cpp | 201 +- .../compiler-rt/lib/dfsan/dfsan_flags.inc | 4 - .../compiler-rt/lib/dfsan/dfsan_interceptors.cpp | 41 +- .../compiler-rt/lib/dfsan/done_abilist.txt | 85 + .../compiler-rt/lib/fuzzer/FuzzerCorpus.h | 62 +- .../compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.cpp | 2 +- .../compiler-rt/lib/fuzzer/FuzzerDriver.cpp | 91 +- .../lib/fuzzer/FuzzerExtFunctionsWeak.cpp | 2 +- .../compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp | 2 +- .../compiler-rt/lib/fuzzer/FuzzerFlags.def | 37 +- .../compiler-rt/lib/fuzzer/FuzzerFork.cpp | 14 +- .../compiler-rt/lib/fuzzer/FuzzerIO.cpp | 45 + .../llvm-project/compiler-rt/lib/fuzzer/FuzzerIO.h | 6 + .../compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp | 8 +- .../compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp | 14 +- .../compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | 253 + .../compiler-rt/lib/fuzzer/FuzzerInternal.h | 4 +- .../compiler-rt/lib/fuzzer/FuzzerLoop.cpp | 69 +- .../compiler-rt/lib/fuzzer/FuzzerMutate.cpp | 40 +- .../compiler-rt/lib/fuzzer/FuzzerMutate.h | 14 +- .../compiler-rt/lib/fuzzer/FuzzerOptions.h | 9 +- .../compiler-rt/lib/fuzzer/FuzzerPlatform.h | 18 +- .../compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | 34 +- .../compiler-rt/lib/fuzzer/FuzzerTracePC.h | 6 +- .../compiler-rt/lib/fuzzer/FuzzerUtil.h | 6 + .../compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp | 19 +- .../compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp | 2 +- .../compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp | 4 +- .../compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 14 +- .../compiler-rt/lib/gwp_asan/common.cpp | 3 + .../compiler-rt/lib/gwp_asan/crash_handler.cpp | 24 +- .../compiler-rt/lib/gwp_asan/crash_handler.h | 2 +- .../compiler-rt/lib/gwp_asan/definitions.h | 2 +- .../lib/gwp_asan/guarded_pool_allocator.cpp | 114 +- .../lib/gwp_asan/guarded_pool_allocator.h | 78 +- .../llvm-project/compiler-rt/lib/gwp_asan/mutex.h | 14 +- .../compiler-rt/lib/gwp_asan/optional/backtrace.h | 48 +- .../lib/gwp_asan/optional/backtrace_fuchsia.cpp | 21 + .../lib/gwp_asan/optional/backtrace_linux_libc.cpp | 25 +- .../optional/backtrace_sanitizer_common.cpp | 49 +- .../lib/gwp_asan/optional/options_parser.cpp | 249 +- .../lib/gwp_asan/optional/options_parser.h | 12 +- .../compiler-rt/lib/gwp_asan/optional/printf.h | 33 + .../lib/gwp_asan/optional/segv_handler.h | 70 +- .../lib/gwp_asan/optional/segv_handler_fuchsia.cpp | 22 + .../lib/gwp_asan/optional/segv_handler_posix.cpp | 182 +- .../compiler-rt/lib/gwp_asan/options.inc | 30 +- .../gwp_asan/platform_specific/common_fuchsia.cpp | 15 + .../gwp_asan/platform_specific/common_posix.cpp | 6 +- .../guarded_pool_allocator_fuchsia.cpp | 103 + .../guarded_pool_allocator_fuchsia.h | 22 + .../guarded_pool_allocator_posix.cpp | 64 +- .../guarded_pool_allocator_posix.h | 18 + .../platform_specific/guarded_pool_allocator_tls.h | 55 + .../gwp_asan/platform_specific/mutex_fuchsia.cpp | 21 + .../lib/gwp_asan/platform_specific/mutex_fuchsia.h | 23 + .../lib/gwp_asan/platform_specific/mutex_posix.h | 23 + .../platform_specific/utilities_fuchsia.cpp | 19 + .../gwp_asan/platform_specific/utilities_posix.cpp | 65 +- .../compiler-rt/lib/gwp_asan/random.cpp | 31 - .../llvm-project/compiler-rt/lib/gwp_asan/random.h | 23 - .../compiler-rt/lib/gwp_asan/utilities.cpp | 63 + .../compiler-rt/lib/gwp_asan/utilities.h | 18 +- .../llvm-project/compiler-rt/lib/hwasan/hwasan.cpp | 4 +- .../llvm-project/compiler-rt/lib/hwasan/hwasan.h | 9 +- .../compiler-rt/lib/hwasan/hwasan_allocator.cpp | 20 +- .../compiler-rt/lib/hwasan/hwasan_allocator.h | 14 +- .../lib/hwasan/hwasan_dynamic_shadow.cpp | 50 +- .../lib/hwasan/hwasan_interceptors_vfork.S | 1 + .../lib/hwasan/hwasan_interface_internal.h | 3 + .../compiler-rt/lib/hwasan/hwasan_linux.cpp | 74 +- .../compiler-rt/lib/hwasan/hwasan_malloc_bisect.h | 2 +- .../compiler-rt/lib/hwasan/hwasan_mapping.h | 9 + .../compiler-rt/lib/hwasan/hwasan_new_delete.cpp | 39 +- .../compiler-rt/lib/hwasan/hwasan_report.cpp | 25 +- .../compiler-rt/lib/hwasan/hwasan_thread.h | 2 - .../compiler-rt/lib/hwasan/hwasan_thread_list.h | 63 +- .../compiler-rt/lib/interception/interception.h | 4 +- .../lib/interception/interception_linux.cpp | 10 +- .../lib/interception/interception_linux.h | 10 +- .../lib/interception/interception_win.cpp | 6 +- contrib/llvm-project/compiler-rt/lib/lsan/lsan.cpp | 4 +- .../compiler-rt/lib/lsan/lsan_allocator.cpp | 10 + .../compiler-rt/lib/lsan/lsan_common.cpp | 298 +- .../compiler-rt/lib/lsan/lsan_common.h | 20 +- .../compiler-rt/lib/lsan/lsan_common_fuchsia.cpp | 7 +- .../compiler-rt/lib/lsan/lsan_common_linux.cpp | 5 + .../compiler-rt/lib/lsan/lsan_fuchsia.h | 2 +- .../compiler-rt/lib/lsan/lsan_interceptors.cpp | 17 +- .../llvm-project/compiler-rt/lib/lsan/lsan_posix.h | 2 +- .../compiler-rt/lib/lsan/lsan_thread.cpp | 5 + .../compiler-rt/lib/lsan/lsan_thread.h | 2 + .../compiler-rt/lib/memprof/README.txt | 17 + .../compiler-rt/lib/memprof/memprof.syms.extra | 1 + .../compiler-rt/lib/memprof/memprof_allocator.cpp | 905 ++++ .../compiler-rt/lib/memprof/memprof_allocator.h | 105 + .../lib/memprof/memprof_descriptions.cpp | 70 + .../compiler-rt/lib/memprof/memprof_descriptions.h | 45 + .../compiler-rt/lib/memprof/memprof_flags.cpp | 93 + .../compiler-rt/lib/memprof/memprof_flags.h | 45 + .../compiler-rt/lib/memprof/memprof_flags.inc | 49 + .../compiler-rt/lib/memprof/memprof_init_version.h | 26 + .../lib/memprof/memprof_interceptors.cpp | 366 ++ .../compiler-rt/lib/memprof/memprof_interceptors.h | 54 + .../memprof/memprof_interceptors_memintrinsics.cpp | 29 + .../memprof/memprof_interceptors_memintrinsics.h | 79 + .../lib/memprof/memprof_interface_internal.h | 64 + .../compiler-rt/lib/memprof/memprof_internal.h | 104 + .../compiler-rt/lib/memprof/memprof_linux.cpp | 80 + .../lib/memprof/memprof_malloc_linux.cpp | 226 + .../compiler-rt/lib/memprof/memprof_mapping.h | 113 + .../compiler-rt/lib/memprof/memprof_new_delete.cpp | 145 + .../compiler-rt/lib/memprof/memprof_posix.cpp | 55 + .../compiler-rt/lib/memprof/memprof_preinit.cpp | 23 + .../compiler-rt/lib/memprof/memprof_rtl.cpp | 321 ++ .../lib/memprof/memprof_shadow_setup.cpp | 62 + .../compiler-rt/lib/memprof/memprof_stack.cpp | 59 + .../compiler-rt/lib/memprof/memprof_stack.h | 75 + .../compiler-rt/lib/memprof/memprof_stats.cpp | 157 + .../compiler-rt/lib/memprof/memprof_stats.h | 61 + .../compiler-rt/lib/memprof/memprof_thread.cpp | 220 + .../compiler-rt/lib/memprof/memprof_thread.h | 138 + .../compiler-rt/lib/memprof/weak_symbols.txt | 1 + contrib/llvm-project/compiler-rt/lib/msan/msan.cpp | 51 +- .../compiler-rt/lib/msan/msan_interceptors.cpp | 10 +- .../compiler-rt/lib/msan/msan_interface_internal.h | 10 +- .../compiler-rt/lib/msan/msan_linux.cpp | 3 +- .../compiler-rt/lib/msan/msan_poisoning.cpp | 81 +- .../compiler-rt/lib/msan/msan_thread.cpp | 58 +- .../compiler-rt/lib/msan/msan_thread.h | 24 +- .../compiler-rt/lib/profile/GCDAProfiling.c | 75 +- .../compiler-rt/lib/profile/InstrProfiling.c | 6 +- .../compiler-rt/lib/profile/InstrProfiling.h | 9 + .../compiler-rt/lib/profile/InstrProfilingBuffer.c | 24 +- .../compiler-rt/lib/profile/InstrProfilingFile.c | 35 +- .../lib/profile/InstrProfilingInternal.c | 3 + .../lib/profile/InstrProfilingPlatformDarwin.c | 3 + .../lib/profile/InstrProfilingPlatformLinux.c | 2 +- .../compiler-rt/lib/profile/InstrProfilingPort.h | 10 +- .../compiler-rt/lib/profile/InstrProfilingValue.c | 39 +- .../lib/profile/InstrProfilingVersionVar.c | 17 + .../compiler-rt/lib/profile/InstrProfilingWriter.c | 3 + .../lib/sanitizer_common/sanitizer_allocator.cpp | 39 +- .../lib/sanitizer_common/sanitizer_allocator.h | 6 +- .../sanitizer_common/sanitizer_allocator_checks.h | 10 +- .../sanitizer_allocator_primary32.h | 1 + *** 112076 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Sun Jun 13 20:02:55 2021 Return-Path: Delivered-To: dev-commits-src-main@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 2FA94650515; Sun, 13 Jun 2021 20:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G359C0jPbz4gZS; Sun, 13 Jun 2021 20:02:55 +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 007612728E; Sun, 13 Jun 2021 20:02:55 +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 15DK2svN014111; Sun, 13 Jun 2021 20:02:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DK2rjR014110; Sun, 13 Jun 2021 20:02:53 GMT (envelope-from git) Date: Sun, 13 Jun 2021 20:02:53 GMT Message-Id: <202106132002.15DK2rjR014110@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: d409305fa383 - main - Merge llvm-project 12.0.0 release 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: d409305fa3838fb39b38c26fc085fb729b8766d5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 20:02:55 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d409305fa3838fb39b38c26fc085fb729b8766d5 commit d409305fa3838fb39b38c26fc085fb729b8766d5 Merge: e8d8bef961a5 b4125f7d51da Author: Dimitry Andric AuthorDate: 2021-04-26 11:23:24 +0000 Commit: Dimitry Andric CommitDate: 2021-06-13 20:01:15 +0000 Merge llvm-project 12.0.0 release This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.0-0-gd28af7c654d8, a.k.a. 12.0.0 release. PR: 255570 MFC after: 6 weeks .../clang/include/clang/AST/ASTContext.h | 3 + .../llvm-project/clang/include/clang/AST/Decl.h | 11 +- .../llvm-project/clang/include/clang/AST/DeclCXX.h | 6 + .../llvm-project/clang/include/clang/AST/Expr.h | 3 +- .../llvm-project/clang/include/clang/AST/Mangle.h | 3 + .../include/clang/AST/MangleNumberingContext.h | 5 + .../clang/include/clang/AST/RecursiveASTVisitor.h | 12 + .../clang/include/clang/ASTMatchers/ASTMatchers.h | 2 +- .../clang/include/clang/Basic/CodeGenOptions.def | 3 + .../clang/include/clang/Basic/CodeGenOptions.h | 6 + .../clang/include/clang/Driver/Options.td | 7 +- .../clang/include/clang/Lex/VariadicMacroSupport.h | 10 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 18 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 2 + contrib/llvm-project/clang/lib/AST/CXXABI.h | 5 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 29 +- contrib/llvm-project/clang/lib/AST/DeclCXX.cpp | 14 + .../llvm-project/clang/lib/AST/ExprConstant.cpp | 50 +- .../llvm-project/clang/lib/AST/ItaniumCXXABI.cpp | 6 + .../llvm-project/clang/lib/AST/ItaniumMangle.cpp | 346 +++-- .../llvm-project/clang/lib/AST/MicrosoftCXXABI.cpp | 33 +- .../clang/lib/ASTMatchers/ASTMatchFinder.cpp | 48 +- .../clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 2 +- .../llvm-project/clang/lib/Basic/ProfileList.cpp | 1 + .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 3 - .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 6 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 2 + .../llvm-project/clang/lib/CodeGen/CGCUDANV.cpp | 8 + contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 5 + .../clang/lib/CodeGen/CGExprConstant.cpp | 2 +- .../clang/lib/CodeGen/CGOpenMPRuntime.cpp | 34 +- .../clang/lib/CodeGen/CodeGenFunction.h | 11 + .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 2 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 15 +- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 5 + .../clang/lib/Driver/ToolChains/Linux.cpp | 9 - .../clang/lib/Driver/ToolChains/MSVC.cpp | 6 +- .../clang/lib/Driver/ToolChains/OpenBSD.cpp | 1 + .../clang/lib/Format/UnwrappedLineFormatter.cpp | 2 +- .../clang/lib/Frontend/CompilerInvocation.cpp | 7 +- .../clang/lib/Frontend/InitPreprocessor.cpp | 2 +- .../llvm-project/clang/lib/Headers/avx512fintrin.h | 16 +- .../llvm-project/clang/lib/Lex/Preprocessor.cpp | 8 +- contrib/llvm-project/clang/lib/Lex/TokenLexer.cpp | 10 +- contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/Sema.cpp | 43 +- .../clang/lib/Sema/SemaCodeComplete.cpp | 21 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 88 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 2 +- contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp | 10 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 23 +- .../llvm-project/clang/lib/Sema/TreeTransform.h | 7 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 1 + .../clang/lib/Serialization/ASTWriter.cpp | 1 + .../sanitizer_platform_interceptors.h | 2 +- contrib/llvm-project/libcxx/include/__locale | 20 +- .../libcxx/include/__threading_support | 2 +- contrib/llvm-project/libcxx/include/bit | 2 +- contrib/llvm-project/libcxx/include/limits | 4 +- contrib/llvm-project/libcxx/include/memory | 2 +- contrib/llvm-project/libcxx/src/atomic.cpp | 6 + contrib/llvm-project/libcxx/src/locale.cpp | 2 +- contrib/llvm-project/lld/ELF/InputSection.cpp | 5 +- contrib/llvm-project/lld/docs/ReleaseNotes.rst | 108 +- .../source/Host/common/NativeProcessProtocol.cpp | 11 +- .../Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp | 48 +- .../Plugins/Platform/FreeBSD/PlatformFreeBSD.h | 3 - .../Plugins/Process/FreeBSD/FreeBSDThread.cpp | 615 --------- .../source/Plugins/Process/FreeBSD/FreeBSDThread.h | 111 -- .../NativeProcessFreeBSD.cpp | 57 +- .../NativeProcessFreeBSD.h | 11 +- .../NativeRegisterContextFreeBSD.cpp | 2 +- .../NativeRegisterContextFreeBSD.h | 0 .../FreeBSD/NativeRegisterContextFreeBSD_arm.cpp | 202 +++ .../FreeBSD/NativeRegisterContextFreeBSD_arm.h | 68 + .../FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp | 288 ++++ .../FreeBSD/NativeRegisterContextFreeBSD_arm64.h | 86 ++ .../NativeRegisterContextFreeBSD_mips64.cpp | 186 +++ .../FreeBSD/NativeRegisterContextFreeBSD_mips64.h | 71 + .../NativeRegisterContextFreeBSD_powerpc.cpp | 289 ++++ .../FreeBSD/NativeRegisterContextFreeBSD_powerpc.h | 74 + .../NativeRegisterContextFreeBSD_x86_64.cpp | 0 .../NativeRegisterContextFreeBSD_x86_64.h | 6 +- .../NativeThreadFreeBSD.cpp | 5 + .../NativeThreadFreeBSD.h | 2 +- .../Plugins/Process/FreeBSD/POSIXStopInfo.cpp | 44 - .../source/Plugins/Process/FreeBSD/POSIXStopInfo.h | 66 - .../Plugins/Process/FreeBSD/ProcessFreeBSD.cpp | 1080 --------------- .../Plugins/Process/FreeBSD/ProcessFreeBSD.h | 221 --- .../Plugins/Process/FreeBSD/ProcessMonitor.cpp | 1424 -------------------- .../Plugins/Process/FreeBSD/ProcessMonitor.h | 279 ---- .../Plugins/Process/FreeBSD/RegisterContextPOSIX.h | 63 - .../RegisterContextPOSIXProcessMonitor_arm.cpp | 260 ---- .../RegisterContextPOSIXProcessMonitor_arm.h | 80 -- .../RegisterContextPOSIXProcessMonitor_arm64.cpp | 267 ---- .../RegisterContextPOSIXProcessMonitor_arm64.h | 82 -- .../RegisterContextPOSIXProcessMonitor_mips64.cpp | 262 ---- .../RegisterContextPOSIXProcessMonitor_mips64.h | 82 -- .../RegisterContextPOSIXProcessMonitor_powerpc.cpp | 274 ---- .../RegisterContextPOSIXProcessMonitor_powerpc.h | 84 -- .../RegisterContextPOSIXProcessMonitor_x86.cpp | 613 --------- .../RegisterContextPOSIXProcessMonitor_x86.h | 81 -- .../NetBSD/NativeRegisterContextNetBSD_x86_64.h | 4 +- .../Utility/NativeProcessSoftwareSingleStep.cpp | 182 +++ .../Utility/NativeProcessSoftwareSingleStep.h | 31 + .../Utility/NativeRegisterContextDBReg_arm64.cpp | 466 +++++++ .../Utility/NativeRegisterContextDBReg_arm64.h | 79 ++ ..._x86.cpp => NativeRegisterContextDBReg_x86.cpp} | 38 +- ...oint_x86.h => NativeRegisterContextDBReg_x86.h} | 10 +- .../Process/Utility/RegisterInfos_powerpc.h | 4 +- .../lldb/tools/lldb-server/lldb-gdbserver.cpp | 2 +- contrib/llvm-project/llvm/include/llvm-c/Core.h | 6 +- contrib/llvm-project/llvm/include/llvm-c/Orc.h | 7 +- .../llvm/include/llvm/Analysis/AssumptionCache.h | 2 +- .../llvm/include/llvm/CodeGen/FastISel.h | 5 +- .../llvm/include/llvm/CodeGen/MachineInstr.h | 7 + .../llvm/include/llvm/CodeGen/TargetLowering.h | 4 + .../llvm/include/llvm/Demangle/ItaniumDemangle.h | 68 +- .../llvm/include/llvm/Frontend/OpenMP/OMPKinds.def | 4 +- .../llvm-project/llvm/include/llvm/IR/InstrTypes.h | 3 - .../llvm/include/llvm/IR/Instruction.h | 7 + .../llvm/include/llvm/IR/IntrinsicInst.h | 8 +- .../llvm/include/llvm/IR/Intrinsics.td | 2 +- .../llvm/include/llvm/IR/IntrinsicsRISCV.td | 7 +- .../llvm-project/llvm/include/llvm/IR/Metadata.h | 18 + .../llvm-project/llvm/include/llvm/IR/Operator.h | 5 + .../llvm/include/llvm/IR/PseudoProbe.h | 27 +- .../include/llvm/Passes/StandardInstrumentations.h | 2 + .../llvm/include/llvm/ProfileData/ProfileCommon.h | 3 + .../llvm/include/llvm/ProfileData/SampleProf.h | 29 +- .../include/llvm/ProfileData/SampleProfReader.h | 4 + .../llvm/include/llvm/Support/CommandLine.h | 13 + .../llvm/Transforms/IPO/SampleContextTracker.h | 19 +- .../llvm/Transforms/IPO/SampleProfileProbe.h | 41 + .../llvm/include/llvm/Transforms/Utils/Cloning.h | 7 + .../llvm/lib/Analysis/DemandedBits.cpp | 2 +- .../llvm/lib/Analysis/IVDescriptors.cpp | 5 +- .../llvm-project/llvm/lib/Analysis/MemorySSA.cpp | 26 - .../llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp | 81 ++ .../llvm/lib/Analysis/ValueTracking.cpp | 28 +- .../llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 9 +- .../lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 5 + .../llvm/lib/CodeGen/LiveRangeShrink.cpp | 3 +- .../llvm-project/llvm/lib/CodeGen/MachineInstr.cpp | 3 +- .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 17 +- .../llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 10 +- .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 5 +- .../lib/CodeGen/SelectionDAG/TargetLowering.cpp | 31 +- .../llvm/lib/CodeGen/StackProtector.cpp | 2 +- .../llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 8 +- .../lib/ExecutionEngine/Orc/OrcV2CBindings.cpp | 2 +- contrib/llvm-project/llvm/lib/IR/AutoUpgrade.cpp | 42 + contrib/llvm-project/llvm/lib/IR/ConstantFold.cpp | 59 +- contrib/llvm-project/llvm/lib/IR/Instruction.cpp | 14 + contrib/llvm-project/llvm/lib/IR/Operator.cpp | 20 +- contrib/llvm-project/llvm/lib/IR/PseudoProbe.cpp | 41 + contrib/llvm-project/llvm/lib/IR/Verifier.cpp | 6 - .../llvm-project/llvm/lib/MC/ELFObjectWriter.cpp | 11 + .../llvm-project/llvm/lib/Passes/PassBuilder.cpp | 6 + .../llvm-project/llvm/lib/Passes/PassRegistry.def | 1 + .../llvm/lib/Passes/StandardInstrumentations.cpp | 1 + .../lib/ProfileData/Coverage/CoverageMapping.cpp | 1 - .../llvm/lib/ProfileData/ProfileSummaryBuilder.cpp | 34 + .../llvm/lib/ProfileData/SampleProfReader.cpp | 99 +- .../llvm/lib/ProfileData/SampleProfWriter.cpp | 15 +- .../llvm-project/llvm/lib/Support/CommandLine.cpp | 25 +- .../llvm-project/llvm/lib/Support/Windows/Path.inc | 24 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 7 +- .../AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp | 2 +- .../lib/Target/AMDGPU/SIShrinkInstructions.cpp | 24 +- .../llvm/lib/Target/ARM/ARMISelLowering.cpp | 6 +- .../llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 6 + .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 12 +- .../llvm/lib/Target/PowerPC/PPCISelLowering.h | 3 + .../lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 6 +- .../RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | 6 +- .../llvm/lib/Target/RISCV/RISCVCleanupVSETVLI.cpp | 37 +- .../lib/Target/RISCV/RISCVExpandPseudoInsts.cpp | 11 +- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 118 +- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h | 5 +- .../llvm/lib/Target/RISCV/RISCVInstrFormatsV.td | 23 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoB.td | 67 - .../llvm/lib/Target/RISCV/RISCVInstrInfoV.td | 116 +- .../lib/Target/RISCV/RISCVInstrInfoVPseudos.td | 239 ++-- .../lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td | 6 +- contrib/llvm-project/llvm/lib/Target/VE/VE.h | 10 +- .../Target/X86/Disassembler/X86Disassembler.cpp | 1 + .../llvm/lib/Target/X86/X86FastISel.cpp | 8 + .../llvm/lib/Target/X86/X86ISelLowering.cpp | 9 +- .../llvm/lib/Target/X86/X86InstrAVX512.td | 4 +- .../llvm/lib/Target/X86/X86InstrSSE.td | 16 +- .../llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 10 +- .../lib/Transforms/IPO/SampleContextTracker.cpp | 118 +- .../llvm/lib/Transforms/IPO/SampleProfile.cpp | 713 ++++++++-- .../llvm/lib/Transforms/IPO/SampleProfileProbe.cpp | 162 ++- .../Transforms/InstCombine/InstCombineCasts.cpp | 1 + .../lib/Transforms/InstCombine/InstCombinePHI.cpp | 8 +- .../InstCombine/InstCombineSimplifyDemanded.cpp | 8 +- .../InstCombine/InstructionCombining.cpp | 7 +- .../llvm/lib/Transforms/Scalar/ADCE.cpp | 2 +- .../llvm/lib/Transforms/Scalar/JumpThreading.cpp | 10 + .../llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 10 +- .../llvm/lib/Transforms/Scalar/SROA.cpp | 38 +- .../llvm/lib/Transforms/Utils/BuildLibCalls.cpp | 67 - .../llvm/lib/Transforms/Utils/CloneFunction.cpp | 8 + .../llvm/lib/Transforms/Utils/InlineFunction.cpp | 12 +- .../llvm/lib/Transforms/Utils/Local.cpp | 33 +- .../llvm/lib/Transforms/Utils/LoopPeel.cpp | 19 +- .../llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 19 +- .../Vectorize/LoopVectorizationPlanner.h | 4 + .../lib/Transforms/Vectorize/LoopVectorize.cpp | 40 +- .../llvm-project/llvm/tools/llvm-dwp/llvm-dwp.cpp | 4 +- .../llvm/tools/llvm-objdump/llvm-objdump.cpp | 30 +- .../llvm/tools/llvm-profdata/llvm-profdata.cpp | 2 +- .../llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp | 7 +- .../llvm/utils/TableGen/IntrinsicEmitter.cpp | 4 +- .../openmp/runtime/src/kmp_config.h.cmake | 4 +- .../openmp/runtime/src/kmp_runtime.cpp | 21 +- .../openmp/runtime/src/kmp_settings.cpp | 10 +- .../openmp/runtime/src/kmp_tasking.cpp | 3 +- etc/mtree/BSD.include.dist | 2 + lib/clang/include/Plugins/Plugins.def | 1 - lib/clang/include/VCSVersion.inc | 8 +- lib/clang/include/clang/Config/config.h | 2 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/liblldb/Makefile | 36 +- lib/clang/libllvm/Makefile | 1 + lib/libc++/Makefile | 26 +- lib/libc++/__config_site | 40 + lib/libomp/kmp_config.h | 18 + lib/libomp/kmp_i18n_default.inc | 10 +- lib/libomp/kmp_i18n_id.inc | 4 +- lib/libomp/omp-tools.h | 141 +- lib/libomp/omp.h | 144 +- sys/sys/param.h | 2 +- tools/build/mk/OptionalObsoleteFiles.inc | 11 + usr.bin/clang/Makefile | 1 + usr.bin/clang/bugpoint/bugpoint.1 | 8 +- usr.bin/clang/clang/clang.1 | 42 +- usr.bin/clang/llc/llc.1 | 22 +- usr.bin/clang/lldb-server/Makefile | 53 + usr.bin/clang/lldb-server/lldb-server.1 | 262 ++++ usr.bin/clang/lldb/lldb.1 | 39 +- usr.bin/clang/lli/lli.1 | 10 +- usr.bin/clang/llvm-ar/llvm-ar.1 | 10 +- usr.bin/clang/llvm-ar/llvm-ranlib.1 | 8 +- usr.bin/clang/llvm-as/llvm-as.1 | 8 +- usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 | 8 +- usr.bin/clang/llvm-cov/llvm-cov.1 | 25 +- usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1 | 18 +- usr.bin/clang/llvm-diff/llvm-diff.1 | 8 +- usr.bin/clang/llvm-dis/llvm-dis.1 | 8 +- usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1 | 54 +- usr.bin/clang/llvm-extract/llvm-extract.1 | 56 +- usr.bin/clang/llvm-link/llvm-link.1 | 8 +- usr.bin/clang/llvm-mca/llvm-mca.1 | 25 +- usr.bin/clang/llvm-nm/llvm-nm.1 | 15 +- usr.bin/clang/llvm-objcopy/llvm-objcopy.1 | 116 +- usr.bin/clang/llvm-objdump/llvm-objdump.1 | 683 +++++++--- usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1 | 8 +- usr.bin/clang/llvm-profdata/llvm-profdata.1 | 85 +- usr.bin/clang/llvm-size/llvm-size.1 | 10 +- usr.bin/clang/llvm-strings/llvm-strings.1 | 10 +- usr.bin/clang/llvm-symbolizer/llvm-addr2line.1 | 29 +- usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 | 98 +- usr.bin/clang/llvm-tblgen/llvm-tblgen.1 | 806 ++++++++++- usr.bin/clang/opt/opt.1 | 8 +- 269 files changed, 7470 insertions(+), 7919 deletions(-) diff --cc contrib/llvm-project/clang/include/clang/AST/Decl.h index 47c282f0a63d,47c282f0a63d..1c5827b9c3a4 --- a/contrib/llvm-project/clang/include/clang/AST/Decl.h +++ b/contrib/llvm-project/clang/include/clang/AST/Decl.h @@@ -1276,15 -1276,15 +1276,12 @@@ public EvaluatedStmt *getEvaluatedStmt() const; /// Attempt to evaluate the value of the initializer attached to this -- /// declaration, and produce notes explaining why it cannot be evaluated. -- /// Returns a pointer to the value if evaluation succeeded, 0 otherwise. ++ /// declaration, and produce notes explaining why it cannot be evaluated or is ++ /// not a constant expression. Returns a pointer to the value if evaluation ++ /// succeeded, 0 otherwise. APValue *evaluateValue() const; ++ APValue *evaluateValue(SmallVectorImpl &Notes) const; --private: -- APValue *evaluateValueImpl(SmallVectorImpl &Notes, -- bool IsConstantInitialization) const; -- --public: /// Return the already-evaluated value of this variable's /// initializer, or NULL if the value is not yet known. Returns pointer /// to untyped APValue if the value could not be evaluated. diff --cc contrib/llvm-project/clang/include/clang/AST/Expr.h index a44d06967431,a44d06967431..52f8f18af205 --- a/contrib/llvm-project/clang/include/clang/AST/Expr.h +++ b/contrib/llvm-project/clang/include/clang/AST/Expr.h @@@ -699,8 -699,8 +699,7 @@@ public /// notes will be produced if the expression is not a constant expression. bool EvaluateAsInitializer(APValue &Result, const ASTContext &Ctx, const VarDecl *VD, -- SmallVectorImpl &Notes, -- bool IsConstantInitializer) const; ++ SmallVectorImpl &Notes) const; /// EvaluateWithSubstitution - Evaluate an expression as if from the context /// of a call to the given function with the given arguments, inside an diff --cc contrib/llvm-project/clang/lib/AST/Decl.cpp index feb9b0645ebc,feb9b0645ebc..10cfe145b3f0 --- a/contrib/llvm-project/clang/lib/AST/Decl.cpp +++ b/contrib/llvm-project/clang/lib/AST/Decl.cpp @@@ -2384,11 -2384,11 +2384,11 @@@ EvaluatedStmt *VarDecl::getEvaluatedStm APValue *VarDecl::evaluateValue() const { SmallVector Notes; -- return evaluateValueImpl(Notes, hasConstantInitialization()); ++ return evaluateValue(Notes); } --APValue *VarDecl::evaluateValueImpl(SmallVectorImpl &Notes, -- bool IsConstantInitialization) const { ++APValue *VarDecl::evaluateValue( ++ SmallVectorImpl &Notes) const { EvaluatedStmt *Eval = ensureEvaluatedStmt(); const auto *Init = cast(Eval->Value); @@@ -2407,16 -2407,16 +2407,8 @@@ Eval->IsEvaluating = true; -- ASTContext &Ctx = getASTContext(); -- bool Result = Init->EvaluateAsInitializer(Eval->Evaluated, Ctx, this, Notes, -- IsConstantInitialization); -- -- // In C++11, this isn't a constant initializer if we produced notes. In that -- // case, we can't keep the result, because it may only be correct under the -- // assumption that the initializer is a constant context. -- if (IsConstantInitialization && Ctx.getLangOpts().CPlusPlus11 && -- !Notes.empty()) -- Result = false; ++ bool Result = Init->EvaluateAsInitializer(Eval->Evaluated, getASTContext(), ++ this, Notes); // Ensure the computed APValue is cleaned up later if evaluation succeeded, // or that it's empty (so that there's nothing to clean up) if evaluation @@@ -2424,7 -2424,7 +2416,7 @@@ if (!Result) Eval->Evaluated = APValue(); else if (Eval->Evaluated.needsCleanup()) -- Ctx.addDestruction(&Eval->Evaluated); ++ getASTContext().addDestruction(&Eval->Evaluated); Eval->IsEvaluating = false; Eval->WasEvaluated = true; @@@ -2478,14 -2478,14 +2470,7 @@@ bool VarDecl::checkForConstantInitializ assert(!cast(Eval->Value)->isValueDependent()); // Evaluate the initializer to check whether it's a constant expression. -- Eval->HasConstantInitialization = -- evaluateValueImpl(Notes, true) && Notes.empty(); -- -- // If evaluation as a constant initializer failed, allow re-evaluation as a -- // non-constant initializer if we later find we want the value. -- if (!Eval->HasConstantInitialization) -- Eval->WasEvaluated = false; -- ++ Eval->HasConstantInitialization = evaluateValue(Notes) && Notes.empty(); return Eval->HasConstantInitialization; } diff --cc contrib/llvm-project/clang/lib/AST/ExprConstant.cpp index 56181bbe1166,1bdad771a923..b24025664684 --- a/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp @@@ -3302,9 -3302,9 +3302,12 @@@ static bool evaluateVarDeclInit(EvalInf // Check that we can fold the initializer. In C++, we will have already done // this in the cases where it matters for conformance. -- if (!VD->evaluateValue()) { -- Info.FFDiag(E, diag::note_constexpr_var_init_non_constant, 1) << VD; ++ SmallVector Notes; ++ if (!VD->evaluateValue(Notes)) { ++ Info.FFDiag(E, diag::note_constexpr_var_init_non_constant, ++ Notes.size() + 1) << VD; NoteLValueLocation(Info, Base); ++ Info.addNotes(Notes); return false; } @@@ -14856,8 -14866,8 +14869,7 @@@ bool Expr::EvaluateAsConstantExpr(EvalR bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, const VarDecl *VD, -- SmallVectorImpl &Notes, -- bool IsConstantInitialization) const { ++ SmallVectorImpl &Notes) const { assert(!isValueDependent() && "Expression evaluator can't be called on a dependent expression."); @@@ -14870,12 -14880,12 +14882,11 @@@ Expr::EvalStatus EStatus; EStatus.Diag = &Notes; -- EvalInfo Info(Ctx, EStatus, -- (IsConstantInitialization && Ctx.getLangOpts().CPlusPlus11) -- ? EvalInfo::EM_ConstantExpression -- : EvalInfo::EM_ConstantFold); ++ EvalInfo Info(Ctx, EStatus, VD->isConstexpr() ++ ? EvalInfo::EM_ConstantExpression ++ : EvalInfo::EM_ConstantFold); Info.setEvaluatingDecl(VD, Value); -- Info.InConstantContext = IsConstantInitialization; ++ Info.InConstantContext = true; SourceLocation DeclLoc = VD->getLocation(); QualType DeclTy = VD->getType(); diff --cc contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp index 497f9c04c9f8,497f9c04c9f8..decb8129e644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGExprConstant.cpp @@@ -1622,8 -1622,8 +1622,8 @@@ llvm::Constant *ConstantEmitter::tryEmi if (CD->isTrivial() && CD->isDefaultConstructor()) return CGM.EmitNullConstant(D.getType()); } ++ InConstantContext = true; } -- InConstantContext = D.hasConstantInitialization(); QualType destType = D.getType(); diff --cc contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 57cc2d60e2af,83dfa0780547..caa5291ff6fa --- a/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@@ -409,6 -409,6 +409,7 @@@ class InlinedOpenMPRegionRAII llvm::DenseMap LambdaCaptureFields; FieldDecl *LambdaThisCaptureField = nullptr; const CodeGen::CGBlockInfo *BlockInfo = nullptr; ++ bool NoInheritance = false; public: /// Constructs region for combined constructs. @@@ -416,16 -416,16 +417,19 @@@ /// a list of functions used for code generation of implicitly inlined /// regions. InlinedOpenMPRegionRAII(CodeGenFunction &CGF, const RegionCodeGenTy &CodeGen, -- OpenMPDirectiveKind Kind, bool HasCancel) -- : CGF(CGF) { ++ OpenMPDirectiveKind Kind, bool HasCancel, ++ bool NoInheritance = true) ++ : CGF(CGF), NoInheritance(NoInheritance) { // Start emission for the construct. CGF.CapturedStmtInfo = new CGOpenMPInlinedRegionInfo( CGF.CapturedStmtInfo, CodeGen, Kind, HasCancel); -- std::swap(CGF.LambdaCaptureFields, LambdaCaptureFields); -- LambdaThisCaptureField = CGF.LambdaThisCaptureField; -- CGF.LambdaThisCaptureField = nullptr; -- BlockInfo = CGF.BlockInfo; -- CGF.BlockInfo = nullptr; ++ if (NoInheritance) { ++ std::swap(CGF.LambdaCaptureFields, LambdaCaptureFields); ++ LambdaThisCaptureField = CGF.LambdaThisCaptureField; ++ CGF.LambdaThisCaptureField = nullptr; ++ BlockInfo = CGF.BlockInfo; ++ CGF.BlockInfo = nullptr; ++ } } ~InlinedOpenMPRegionRAII() { @@@ -434,9 -434,9 +438,11 @@@ cast(CGF.CapturedStmtInfo)->getOldCSI(); delete CGF.CapturedStmtInfo; CGF.CapturedStmtInfo = OldCSI; -- std::swap(CGF.LambdaCaptureFields, LambdaCaptureFields); -- CGF.LambdaThisCaptureField = LambdaThisCaptureField; -- CGF.BlockInfo = BlockInfo; ++ if (NoInheritance) { ++ std::swap(CGF.LambdaCaptureFields, LambdaCaptureFields); ++ CGF.LambdaThisCaptureField = LambdaThisCaptureField; ++ CGF.BlockInfo = BlockInfo; ++ } } }; @@@ -3853,7 -3853,7 +3859,7 @@@ static void emitPrivatesInit(CodeGenFun // Processing for implicitly captured variables. InlinedOpenMPRegionRAII Region( CGF, [](CodeGenFunction &, PrePostActionTy &) {}, OMPD_unknown, -- /*HasCancel=*/false); ++ /*HasCancel=*/false, /*NoInheritance=*/true); SharedRefLValue = CGF.EmitLValue(Pair.second.OriginalRef); } if (Type->isArrayType()) { @@@ -6214,7 -6214,7 +6220,9 @@@ void CGOpenMPRuntime::emitInlinedDirect bool HasCancel) { if (!CGF.HaveInsertPoint()) return; -- InlinedOpenMPRegionRAII Region(CGF, CodeGen, InnerKind, HasCancel); ++ InlinedOpenMPRegionRAII Region(CGF, CodeGen, InnerKind, HasCancel, ++ InnerKind != OMPD_critical && ++ InnerKind != OMPD_master); CGF.CapturedStmtInfo->EmitBody(CGF, /*S=*/nullptr); } diff --cc contrib/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp index 493e14cb904b,493e14cb904b..070fda664678 --- a/contrib/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp +++ b/contrib/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp @@@ -522,7 -522,7 +522,8 @@@ NativeProcessProtocol::GetSoftwareBreak static const uint8_t g_mips64_opcode[] = {0x00, 0x00, 0x00, 0x0d}; static const uint8_t g_mips64el_opcode[] = {0x0d, 0x00, 0x00, 0x00}; static const uint8_t g_s390x_opcode[] = {0x00, 0x01}; -- static const uint8_t g_ppc64le_opcode[] = {0x08, 0x00, 0xe0, 0x7f}; // trap ++ static const uint8_t g_ppc_opcode[] = {0x7f, 0xe0, 0x00, 0x08}; // trap ++ static const uint8_t g_ppcle_opcode[] = {0x08, 0x00, 0xe0, 0x7f}; // trap switch (GetArchitecture().GetMachine()) { case llvm::Triple::aarch64: @@@ -544,8 -544,8 +545,12 @@@ case llvm::Triple::systemz: return llvm::makeArrayRef(g_s390x_opcode); ++ case llvm::Triple::ppc: ++ case llvm::Triple::ppc64: ++ return llvm::makeArrayRef(g_ppc_opcode); ++ case llvm::Triple::ppc64le: -- return llvm::makeArrayRef(g_ppc64le_opcode); ++ return llvm::makeArrayRef(g_ppcle_opcode); default: return llvm::createStringError(llvm::inconvertibleErrorCode(), @@@ -568,6 -568,6 +573,8 @@@ size_t NativeProcessProtocol::GetSoftwa case llvm::Triple::mips64el: case llvm::Triple::mips: case llvm::Triple::mipsel: ++ case llvm::Triple::ppc: ++ case llvm::Triple::ppc64: case llvm::Triple::ppc64le: // On these architectures the PC doesn't get updated for breakpoint hits. return 0; diff --cc contrib/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp index f4d44eb7e745,f4d44eb7e745..6b39a83fd668 --- a/contrib/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@@ -214,55 -214,55 +214,9 @@@ void PlatformFreeBSD::GetStatus(Stream #endif } --size_t --PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode(Target &target, -- BreakpointSite *bp_site) { -- switch (target.GetArchitecture().GetMachine()) { -- case llvm::Triple::arm: { -- lldb::BreakpointLocationSP bp_loc_sp(bp_site->GetOwnerAtIndex(0)); -- AddressClass addr_class = AddressClass::eUnknown; -- -- if (bp_loc_sp) { -- addr_class = bp_loc_sp->GetAddress().GetAddressClass(); -- if (addr_class == AddressClass::eUnknown && -- (bp_loc_sp->GetAddress().GetFileAddress() & 1)) -- addr_class = AddressClass::eCodeAlternateISA; -- } -- -- if (addr_class == AddressClass::eCodeAlternateISA) { -- // TODO: Enable when FreeBSD supports thumb breakpoints. -- // FreeBSD kernel as of 10.x, does not support thumb breakpoints -- return 0; -- } -- -- static const uint8_t g_arm_breakpoint_opcode[] = {0xFE, 0xDE, 0xFF, 0xE7}; -- size_t trap_opcode_size = sizeof(g_arm_breakpoint_opcode); -- assert(bp_site); -- if (bp_site->SetTrapOpcode(g_arm_breakpoint_opcode, trap_opcode_size)) -- return trap_opcode_size; -- } -- LLVM_FALLTHROUGH; -- default: -- return Platform::GetSoftwareBreakpointTrapOpcode(target, bp_site); -- } --} -- bool PlatformFreeBSD::CanDebugProcess() { if (IsHost()) { -- llvm::Triple host_triple{llvm::sys::getProcessTriple()}; -- bool use_legacy_plugin; -- -- switch (host_triple.getArch()) { -- case llvm::Triple::x86: -- case llvm::Triple::x86_64: -- // FreeBSDRemote plugin supports x86 only at the moment -- use_legacy_plugin = !!getenv("FREEBSD_LEGACY_PLUGIN"); -- break; -- default: -- use_legacy_plugin = true; -- } -- -- return !use_legacy_plugin; ++ return true; } else { // If we're connected, we can debug. return IsConnected(); diff --cc contrib/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h index c198ea18638d,c198ea18638d..4fd10fb1be73 --- a/contrib/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h +++ b/contrib/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h @@@ -44,9 -44,9 +44,6 @@@ public bool CanDebugProcess() override; -- size_t GetSoftwareBreakpointTrapOpcode(Target &target, -- BreakpointSite *bp_site) override; -- void CalculateTrapHandlerSymbolNames() override; MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, diff --cc contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp index 163093c2ab1f,163093c2ab1f..5961ff4439db --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp @@@ -213,8 -213,8 +213,9 @@@ void NativeProcessFreeBSD::MonitorSIGTR llvm::Error error = t.CopyWatchpointsFrom( static_cast(*GetCurrentThread())); if (error) { -- LLDB_LOG(log, "failed to copy watchpoints to new thread {0}: {1}", -- info.pl_lwpid, llvm::toString(std::move(error))); ++ LLDB_LOG_ERROR(log, std::move(error), ++ "failed to copy watchpoints to new thread {1}: {0}", ++ info.pl_lwpid); SetState(StateType::eStateInvalid); return; } @@@ -264,19 -264,19 +265,35 @@@ switch (info.pl_siginfo.si_code) { case TRAP_BRKPT: ++ LLDB_LOG(log, "SIGTRAP/TRAP_BRKPT: si_addr: {0}", ++ info.pl_siginfo.si_addr); ++ if (thread) { -- thread->SetStoppedByBreakpoint(); ++ auto thread_info = ++ m_threads_stepping_with_breakpoint.find(thread->GetID()); ++ if (thread_info != m_threads_stepping_with_breakpoint.end()) { ++ thread->SetStoppedByTrace(); ++ Status brkpt_error = RemoveBreakpoint(thread_info->second); ++ if (brkpt_error.Fail()) ++ LLDB_LOG(log, "pid = {0} remove stepping breakpoint: {1}", ++ thread_info->first, brkpt_error); ++ m_threads_stepping_with_breakpoint.erase(thread_info); ++ } else ++ thread->SetStoppedByBreakpoint(); FixupBreakpointPCAsNeeded(*thread); } SetState(StateType::eStateStopped, true); return; case TRAP_TRACE: ++ LLDB_LOG(log, "SIGTRAP/TRAP_TRACE: si_addr: {0}", ++ info.pl_siginfo.si_addr); ++ if (thread) { auto ®ctx = static_cast( thread->GetRegisterContext()); uint32_t wp_index = LLDB_INVALID_INDEX32; -- Status error = -- regctx.GetWatchpointHitIndex(wp_index, LLDB_INVALID_ADDRESS); ++ Status error = regctx.GetWatchpointHitIndex( ++ wp_index, reinterpret_cast(info.pl_siginfo.si_addr)); if (error.Fail()) LLDB_LOG(log, "received error while checking for watchpoint hits, pid = " @@@ -354,6 -354,6 +371,27 @@@ Status NativeProcessFreeBSD::PtraceWrap return error; } ++llvm::Expected> ++NativeProcessFreeBSD::GetSoftwareBreakpointTrapOpcode(size_t size_hint) { ++ static const uint8_t g_arm_opcode[] = {0xfe, 0xde, 0xff, 0xe7}; ++ static const uint8_t g_thumb_opcode[] = {0x01, 0xde}; ++ ++ switch (GetArchitecture().GetMachine()) { ++ case llvm::Triple::arm: ++ switch (size_hint) { ++ case 2: ++ return llvm::makeArrayRef(g_thumb_opcode); ++ case 4: ++ return llvm::makeArrayRef(g_arm_opcode); ++ default: ++ return llvm::createStringError(llvm::inconvertibleErrorCode(), ++ "Unrecognised trap opcode size hint!"); ++ } ++ default: ++ return NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode(size_hint); ++ } ++} ++ Status NativeProcessFreeBSD::Resume(const ResumeActionList &resume_actions) { Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS)); LLDB_LOG(log, "pid {0}", GetID()); @@@ -623,9 -623,9 +661,8 @@@ size_t NativeProcessFreeBSD::UpdateThre Status NativeProcessFreeBSD::SetBreakpoint(lldb::addr_t addr, uint32_t size, bool hardware) { if (hardware) -- return Status("NativeProcessFreeBSD does not support hardware breakpoints"); -- else -- return SetSoftwareBreakpoint(addr, size); ++ return SetHardwareBreakpoint(addr, size); ++ return SetSoftwareBreakpoint(addr, size); } Status NativeProcessFreeBSD::GetLoadedModuleFileSpec(const char *module_path, @@@ -878,3 -878,3 +915,7 @@@ Status NativeProcessFreeBSD::Reinitiali return error; } ++ ++bool NativeProcessFreeBSD::SupportHardwareSingleStepping() const { ++ return !m_arch.IsMIPS(); ++} diff --cc contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h index 3c7a9400f9c4,3c7a9400f9c4..ceffc370ca33 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h @@@ -10,6 -10,6 +10,8 @@@ #define liblldb_NativeProcessFreeBSD_H_ #include "Plugins/Process/POSIX/NativeProcessELF.h" ++#include "Plugins/Process/Utility/NativeProcessSoftwareSingleStep.h" ++ #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/FileSpec.h" @@@ -25,7 -25,7 +27,8 @@@ namespace process_freebsd /// for debugging. /// /// Changes in the inferior process state are broadcasted. --class NativeProcessFreeBSD : public NativeProcessELF { ++class NativeProcessFreeBSD : public NativeProcessELF, ++ private NativeProcessSoftwareSingleStep { public: class Factory : public NativeProcessProtocol::Factory { public: @@@ -84,6 -84,6 +87,12 @@@ static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr, int data = 0, int *result = nullptr); ++ bool SupportHardwareSingleStepping() const; ++ ++protected: ++ llvm::Expected> ++ GetSoftwareBreakpointTrapOpcode(size_t size_hint) override; ++ private: MainLoop::SignalHandleUP m_sigchld_handle; ArchSpec m_arch; diff --cc contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.cpp index ac3cc4fe788a,ac3cc4fe788a..3d744f773a26 --- a/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.cpp @@@ -8,7 -8,7 +8,7 @@@ #include "NativeRegisterContextFreeBSD.h" --#include "Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.h" ++#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h" #include "lldb/Host/common/NativeProcessProtocol.h" diff --cc contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp index 000000000000,000000000000..c4ee3773eaeb new file mode 100644 --- /dev/null +++ b/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp @@@ -1,0 -1,0 +1,202 @@@ ++//===-- NativeRegisterContextFreeBSD_arm.cpp ------------------------------===// ++// ++// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ++// See https://llvm.org/LICENSE.txt for license information. ++// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++// ++//===----------------------------------------------------------------------===// ++ ++#if defined(__arm__) ++ ++#include "NativeRegisterContextFreeBSD_arm.h" ++ ++#include "lldb/Utility/DataBufferHeap.h" ++#include "lldb/Utility/RegisterValue.h" ++#include "lldb/Utility/Status.h" ++ ++#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h" ++#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h" ++ ++// clang-format off ++#include ++#include ++#include ++// clang-format on ++ ++using namespace lldb; ++using namespace lldb_private; ++using namespace lldb_private::process_freebsd; ++ ++NativeRegisterContextFreeBSD * ++NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD( ++ const ArchSpec &target_arch, NativeThreadProtocol &native_thread) { ++ return new NativeRegisterContextFreeBSD_arm(target_arch, native_thread); ++} ++ ++NativeRegisterContextFreeBSD_arm::NativeRegisterContextFreeBSD_arm( ++ const ArchSpec &target_arch, NativeThreadProtocol &native_thread) ++ : NativeRegisterContextRegisterInfo( ++ native_thread, new RegisterInfoPOSIX_arm(target_arch)) {} ++ ++RegisterInfoPOSIX_arm & ++NativeRegisterContextFreeBSD_arm::GetRegisterInfo() const { ++ return static_cast(*m_register_info_interface_up); ++} ++ ++uint32_t NativeRegisterContextFreeBSD_arm::GetRegisterSetCount() const { ++ return GetRegisterInfo().GetRegisterSetCount(); ++} ++ ++const RegisterSet * ++NativeRegisterContextFreeBSD_arm::GetRegisterSet(uint32_t set_index) const { ++ return GetRegisterInfo().GetRegisterSet(set_index); ++} ++ ++uint32_t NativeRegisterContextFreeBSD_arm::GetUserRegisterCount() const { ++ uint32_t count = 0; ++ for (uint32_t set_index = 0; set_index < GetRegisterSetCount(); ++set_index) ++ count += GetRegisterSet(set_index)->num_registers; ++ return count; ++} ++ ++Status NativeRegisterContextFreeBSD_arm::ReadRegisterSet(uint32_t set) { ++ switch (set) { ++ case RegisterInfoPOSIX_arm::GPRegSet: ++ return NativeProcessFreeBSD::PtraceWrapper(PT_GETREGS, m_thread.GetID(), ++ m_reg_data.data()); ++ case RegisterInfoPOSIX_arm::FPRegSet: ++ return NativeProcessFreeBSD::PtraceWrapper( ++ PT_GETVFPREGS, m_thread.GetID(), ++ m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm::GPR)); ++ } ++ llvm_unreachable("NativeRegisterContextFreeBSD_arm::ReadRegisterSet"); ++} ++ ++Status NativeRegisterContextFreeBSD_arm::WriteRegisterSet(uint32_t set) { ++ switch (set) { ++ case RegisterInfoPOSIX_arm::GPRegSet: ++ return NativeProcessFreeBSD::PtraceWrapper(PT_SETREGS, m_thread.GetID(), ++ m_reg_data.data()); ++ case RegisterInfoPOSIX_arm::FPRegSet: ++ return NativeProcessFreeBSD::PtraceWrapper( ++ PT_SETVFPREGS, m_thread.GetID(), ++ m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm::GPR)); ++ } ++ llvm_unreachable("NativeRegisterContextFreeBSD_arm::WriteRegisterSet"); ++} ++ ++Status ++NativeRegisterContextFreeBSD_arm::ReadRegister(const RegisterInfo *reg_info, ++ RegisterValue ®_value) { ++ Status error; ++ ++ if (!reg_info) { ++ error.SetErrorString("reg_info NULL"); ++ return error; ++ } ++ ++ const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB]; ++ ++ if (reg == LLDB_INVALID_REGNUM) ++ return Status("no lldb regnum for %s", reg_info && reg_info->name ++ ? reg_info->name ++ : ""); ++ ++ uint32_t set = GetRegisterInfo().GetRegisterSetFromRegisterIndex(reg); ++ error = ReadRegisterSet(set); ++ if (error.Fail()) ++ return error; ++ ++ assert(reg_info->byte_offset + reg_info->byte_size <= m_reg_data.size()); ++ reg_value.SetBytes(m_reg_data.data() + reg_info->byte_offset, ++ reg_info->byte_size, endian::InlHostByteOrder()); ++ return error; ++} ++ ++Status NativeRegisterContextFreeBSD_arm::WriteRegister( ++ const RegisterInfo *reg_info, const RegisterValue ®_value) { ++ Status error; ++ ++ if (!reg_info) ++ return Status("reg_info NULL"); ++ ++ const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB]; ++ ++ if (reg == LLDB_INVALID_REGNUM) ++ return Status("no lldb regnum for %s", reg_info && reg_info->name ++ ? reg_info->name ++ : ""); ++ ++ uint32_t set = GetRegisterInfo().GetRegisterSetFromRegisterIndex(reg); ++ error = ReadRegisterSet(set); ++ if (error.Fail()) ++ return error; ++ ++ assert(reg_info->byte_offset + reg_info->byte_size <= m_reg_data.size()); ++ ::memcpy(m_reg_data.data() + reg_info->byte_offset, reg_value.GetBytes(), ++ reg_info->byte_size); ++ ++ return WriteRegisterSet(set); ++} ++ ++Status NativeRegisterContextFreeBSD_arm::ReadAllRegisterValues( ++ lldb::DataBufferSP &data_sp) { ++ Status error; ++ ++ error = ReadRegisterSet(RegisterInfoPOSIX_arm::GPRegSet); ++ if (error.Fail()) ++ return error; ++ ++ error = ReadRegisterSet(RegisterInfoPOSIX_arm::FPRegSet); ++ if (error.Fail()) ++ return error; ++ ++ data_sp.reset(new DataBufferHeap(m_reg_data.size(), 0)); ++ uint8_t *dst = data_sp->GetBytes(); ++ ::memcpy(dst, m_reg_data.data(), m_reg_data.size()); ++ ++ return error; ++} ++ ++Status NativeRegisterContextFreeBSD_arm::WriteAllRegisterValues( ++ const lldb::DataBufferSP &data_sp) { ++ Status error; ++ ++ if (!data_sp) { ++ error.SetErrorStringWithFormat( ++ "NativeRegisterContextFreeBSD_arm::%s invalid data_sp provided", ++ __FUNCTION__); ++ return error; ++ } ++ ++ if (data_sp->GetByteSize() != m_reg_data.size()) { ++ error.SetErrorStringWithFormat( ++ "NativeRegisterContextFreeBSD_arm::%s data_sp contained mismatched " ++ "data size, expected %" PRIu64 ", actual %" PRIu64, ++ __FUNCTION__, m_reg_data.size(), data_sp->GetByteSize()); ++ return error; ++ } ++ ++ uint8_t *src = data_sp->GetBytes(); ++ if (src == nullptr) { ++ error.SetErrorStringWithFormat("NativeRegisterContextFreeBSD_arm::%s " ++ "DataBuffer::GetBytes() returned a null " ++ "pointer", ++ __FUNCTION__); ++ return error; ++ } ++ ::memcpy(m_reg_data.data(), src, m_reg_data.size()); ++ ++ error = WriteRegisterSet(RegisterInfoPOSIX_arm::GPRegSet); ++ if (error.Fail()) ++ return error; *** 31327 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Sun Jun 13 20:18:39 2021 Return-Path: Delivered-To: dev-commits-src-main@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 91033653F3D; Sun, 13 Jun 2021 20:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G35WM3hmBz4hCY; Sun, 13 Jun 2021 20:18: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 669F92714B; Sun, 13 Jun 2021 20:18: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 15DKIdF7028220; Sun, 13 Jun 2021 20:18:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DKIdBV028219; Sun, 13 Jun 2021 20:18:39 GMT (envelope-from git) Date: Sun, 13 Jun 2021 20:18:39 GMT Message-Id: <202106132018.15DKIdBV028219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 0afa9be03937 - main - tests/netgraph: Missed fixup after D30699 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0afa9be03937d60cb5aeba64c81e3e2165bd3737 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 20:18:39 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=0afa9be03937d60cb5aeba64c81e3e2165bd3737 commit 0afa9be03937d60cb5aeba64c81e3e2165bd3737 Author: Lutz Donnerhacke AuthorDate: 2021-06-10 10:21:14 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-13 20:16:52 +0000 tests/netgraph: Missed fixup after D30699 During D30699 the existing basic tests were missed. Furthermore debugging output was still in the code, which is removed now. MFC: together with D30699 Differential Revision: https://reviews.freebsd.org/D30714 --- tests/sys/netgraph/basic.c | 59 ++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/tests/sys/netgraph/basic.c b/tests/sys/netgraph/basic.c index 614208ba42a8..83a129a1972a 100644 --- a/tests/sys/netgraph/basic.c +++ b/tests/sys/netgraph/basic.c @@ -37,8 +37,6 @@ #include "util.h" -static void get_data(void *data, size_t len, void *ctx); - ATF_TC(send_recv); ATF_TC_HEAD(send_recv, conf) { @@ -48,16 +46,16 @@ ATF_TC_HEAD(send_recv, conf) ATF_TC_BODY(send_recv, dummy) { char msg[] = "test"; - int received; + ng_counter_t r; ng_init(); ng_connect(".", "a", ".", "b"); - ng_register_data("b", get_data); + ng_register_data("b", get_data0); ng_send_data("a", msg, sizeof(msg)); - received = 0; - ng_handle_events(50, &received); - ATF_CHECK(received == 1); + ng_counter_clear(r); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 1); } ATF_TC(node); @@ -69,7 +67,7 @@ ATF_TC_HEAD(node, conf) ATF_TC_BODY(node, dummy) { char msg[] = "test"; - int received; + ng_counter_t r; ng_init(); ng_mkpeer(".", "a", "hub", "a"); @@ -78,20 +76,20 @@ ATF_TC_BODY(node, dummy) ng_connect(".", "b", "test hub:", "b"); ng_connect(".", "c", "test hub:", "c"); - ng_register_data("a", get_data); - ng_register_data("b", get_data); - ng_register_data("c", get_data); + ng_register_data("a", get_data0); + ng_register_data("b", get_data1); + ng_register_data("c", get_data2); - received = 0; + ng_counter_clear(r); ng_send_data("a", msg, sizeof(msg)); - ng_handle_events(50, &received); - ATF_CHECK(received == 2); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 1 && r[2] == 1); ng_rmhook(".", "b"); - received = 0; + ng_counter_clear(r); ng_send_data("a", msg, sizeof(msg)); - ng_handle_events(50, &received); - ATF_CHECK(received == 1); + ng_handle_events(50, &r); + ATF_CHECK(r[0] == 0 && r[1] == 0 && r[2] == 1); ng_shutdown("test hub:"); } @@ -146,13 +144,14 @@ ATF_TC_HEAD(queuelimit, conf) ATF_TC_BODY(queuelimit, dummy) { - int received, i; + ng_counter_t r; + int i; char msg[] = "test"; const int MAX = 1000; ng_init(); ng_connect(".", "a", ".", "b"); - ng_register_data("b", get_data); + ng_register_data("b", get_data0); ng_errors(PASS); for (i = 0; i < MAX; i++) @@ -163,15 +162,13 @@ ATF_TC_BODY(queuelimit, dummy) /* no ng_handle_events -> messages stall */ } ng_errors(FAIL); - printf("queued %d\n", i); - sleep(3); - received = 0; - ng_handle_events(50, &received); - ATF_CHECK(received > 100); - ATF_CHECK(received == i); + ng_counter_clear(r); + ng_handle_events(50, &r); + ATF_CHECK(r[0] > 100); + ATF_CHECK(r[0] == i); atf_tc_expect_fail("Queue full (%d)", i); - ATF_CHECK(received == MAX); + ATF_CHECK(r[0] == MAX); atf_tc_expect_pass(); } @@ -185,13 +182,3 @@ ATF_TP_ADD_TCS(basic) return atf_no_error(); } - -static void -get_data(void *data, size_t len, void *ctx) -{ - int *cnt = ctx; - - (void)data; - printf("Got %zu bytes of data.\n", len); - (*cnt)++; -} From owner-dev-commits-src-main@freebsd.org Sun Jun 13 20:32:22 2021 Return-Path: Delivered-To: dev-commits-src-main@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 EFEE665736C; Sun, 13 Jun 2021 20:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G35qB5z3Zz4jfw; Sun, 13 Jun 2021 20:32:22 +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 B5DD427A0A; Sun, 13 Jun 2021 20:32:22 +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 15DKWMlB051797; Sun, 13 Jun 2021 20:32:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DKWM4R051796; Sun, 13 Jun 2021 20:32:22 GMT (envelope-from git) Date: Sun, 13 Jun 2021 20:32:22 GMT Message-Id: <202106132032.15DKWM4R051796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 43e4821315c3 - main - tests/netgraph: Check for PR241954 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43e4821315c31db067e23564b9bfafb519e77b2b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 20:32:23 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=43e4821315c31db067e23564b9bfafb519e77b2b commit 43e4821315c31db067e23564b9bfafb519e77b2b Author: Lutz Donnerhacke AuthorDate: 2021-06-10 09:54:31 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-06-13 20:29:56 +0000 tests/netgraph: Check for PR241954 Add tests to check for renaming issues reported in PR241954 and solved in D30110. MFC: Together with D30629 Differential Revision: https://reviews.freebsd.org/D30713 --- tests/sys/netgraph/basic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/sys/netgraph/basic.c b/tests/sys/netgraph/basic.c index 83a129a1972a..573422add694 100644 --- a/tests/sys/netgraph/basic.c +++ b/tests/sys/netgraph/basic.c @@ -73,6 +73,13 @@ ATF_TC_BODY(node, dummy) ng_mkpeer(".", "a", "hub", "a"); ng_name("a", "test hub"); + ng_errors(PASS); + ng_name("a", "test hub"); + ng_errors(FAIL); + if (errno == EADDRINUSE) + atf_tc_expect_fail("PR241954"); + ATF_CHECK_ERRNO(0, 1); + atf_tc_expect_pass(); ng_connect(".", "b", "test hub:", "b"); ng_connect(".", "c", "test hub:", "c"); From owner-dev-commits-src-main@freebsd.org Sun Jun 13 22:43:30 2021 Return-Path: Delivered-To: dev-commits-src-main@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 6A93464D20F; Sun, 13 Jun 2021 22:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G38kV2QJPz3H6N; Sun, 13 Jun 2021 22:43: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 3BFEB1A14; Sun, 13 Jun 2021 22:43: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 15DMhUWP027578; Sun, 13 Jun 2021 22:43:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15DMhUtp027577; Sun, 13 Jun 2021 22:43:30 GMT (envelope-from git) Date: Sun, 13 Jun 2021 22:43:30 GMT Message-Id: <202106132243.15DMhUtp027577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: efec757b2042 - main - bhyve: enhance debug info for memory range clash MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efec757b20425ac68171acc7f9cec8be750db688 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 22:43:30 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=efec757b20425ac68171acc7f9cec8be750db688 commit efec757b20425ac68171acc7f9cec8be750db688 Author: Robert Crowston AuthorDate: 2021-04-10 19:16:02 +0000 Commit: Warner Losh CommitDate: 2021-06-13 22:41:45 +0000 bhyve: enhance debug info for memory range clash Explain what the two clashing regions are. Reivewed by: grehan, jhb Differential Revision: https://reviews.freebsd.org/D29696 Pull Request: https://github.com/freebsd/freebsd-src/pull/463 --- usr.sbin/bhyve/mem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/mem.c b/usr.sbin/bhyve/mem.c index 90aefe45c856..55f851590128 100644 --- a/usr.sbin/bhyve/mem.c +++ b/usr.sbin/bhyve/mem.c @@ -109,9 +109,11 @@ mmio_rb_add(struct mmio_rb_tree *rbt, struct mmio_rb_range *new) if (overlap != NULL) { #ifdef RB_DEBUG - printf("overlap detected: new %lx:%lx, tree %lx:%lx\n", + printf("overlap detected: new %lx:%lx, tree %lx:%lx, '%s' " + "claims region already claimed for '%s'\n", new->mr_base, new->mr_end, - overlap->mr_base, overlap->mr_end); + overlap->mr_base, overlap->mr_end, + new->mr_param.name, overlap->mr_param.name); #endif return (EEXIST);