CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: macallan Date: Mon Feb 11 07:51:46 UTC 2019 Modified Files: src/sys/arch/sparc64/sparc64: vm_machdep.c Log Message: retry timed out IPIs, complain and dump timing info into dmesg ok martin@ To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/arch/sparc64/sparc64/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/vm_machdep.c diff -u src/sys/arch/sparc64/sparc64/vm_machdep.c:1.101 src/sys/arch/sparc64/sparc64/vm_machdep.c:1.102 --- src/sys/arch/sparc64/sparc64/vm_machdep.c:1.101 Fri Nov 6 15:30:59 2015 +++ src/sys/arch/sparc64/sparc64/vm_machdep.c Mon Feb 11 07:51:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.101 2015/11/06 15:30:59 martin Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.102 2019/02/11 07:51:46 macallan Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.101 2015/11/06 15:30:59 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.102 2019/02/11 07:51:46 macallan Exp $"); #include "opt_multiprocessor.h" @@ -305,12 +305,13 @@ fpusave_lwp(struct lwp *l, bool save) } for (ci = cpus; ci != NULL; ci = ci->ci_next) { - int spincount; + int spincount, retrycount=0; if (ci == curcpu() || !CPUSET_HAS(cpus_active, ci->ci_index)) continue; if (ci->ci_fplwp != l) continue; +again: sparc64_send_ipi(ci->ci_cpuid, save ? sparc64_ipi_save_fpstate : sparc64_ipi_drop_fpstate, (uintptr_t)l, 0); @@ -319,9 +320,13 @@ fpusave_lwp(struct lwp *l, bool save) while (ci->ci_fplwp == l) { membar_Sync(); spincount++; - if (spincount > 1000) -panic("fpusave_lwp ipi didn't"); + if (spincount > 1000) { +printf("fpusave_lwp ipi didn't (%d)\n", retrycount); +retrycount++; +goto again; + } } + if (retrycount > 0) printf("spincount %d\n", spincount); break; } #else
CVS commit: src/sys/dev/nvmm
Module Name:src Committed By: maxv Date: Mon Feb 11 07:07:37 UTC 2019 Modified Files: src/sys/dev/nvmm: nvmm_internal.h Log Message: Increase the max guest ram from 4GB to 128GB. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/nvmm/nvmm_internal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/nvmm/nvmm_internal.h diff -u src/sys/dev/nvmm/nvmm_internal.h:1.3 src/sys/dev/nvmm/nvmm_internal.h:1.4 --- src/sys/dev/nvmm/nvmm_internal.h:1.3 Sat Jan 26 15:25:51 2019 +++ src/sys/dev/nvmm/nvmm_internal.h Mon Feb 11 07:07:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_internal.h,v 1.3 2019/01/26 15:25:51 maxv Exp $ */ +/* $NetBSD: nvmm_internal.h,v 1.4 2019/02/11 07:07:37 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #define NVMM_MAX_MACHINES 128 #define NVMM_MAX_VCPUS 256 #define NVMM_MAX_SEGS 32 -#define NVMM_MAX_RAM (4UL * (1 << 30)) +#define NVMM_MAX_RAM (128ULL * (1 << 30)) struct nvmm_cpu { /* Shared. */
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Mon Feb 11 05:59:00 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: Rename the siginfo4 test in ATF t_ptrace_wait* The siginfo group of ptrace(2) tests has been replaced with new individual tests or merged into existing ones. This is the last siginfo* test that has been renamed. New name: traceme_exec. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.81 src/tests/lib/libc/sys/t_ptrace_wait.c:1.82 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.81 Mon Feb 11 05:51:20 2019 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Mon Feb 11 05:59:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.81 2019/02/11 05:51:20 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.82 2019/02/11 05:59:00 kamil Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.81 2019/02/11 05:51:20 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.82 2019/02/11 05:59:00 kamil Exp $"); #include #include @@ -3431,14 +3431,14 @@ PTRACE_SIGINFO(siginfo_set_faked, true) /// -ATF_TC(siginfo4); -ATF_TC_HEAD(siginfo4, tc) +ATF_TC(traceme_exec); +ATF_TC_HEAD(traceme_exec, tc) { atf_tc_set_md_var(tc, "descr", "Detect SIGTRAP TRAP_EXEC from tracee"); } -ATF_TC_BODY(siginfo4, tc) +ATF_TC_BODY(traceme_exec, tc) { const int sigval = SIGTRAP; pid_t child, wpid; @@ -3490,6 +3490,8 @@ ATF_TC_BODY(siginfo4, tc) TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } +/// + volatile lwpid_t the_lwp_id = 0; static void @@ -5338,7 +5340,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, siginfo_set_unmodified); ATF_TP_ADD_TC(tp, siginfo_set_faked); - ATF_TP_ADD_TC(tp, siginfo4); + ATF_TP_ADD_TC(tp, traceme_exec); ATF_TP_ADD_TC(tp, lwp_create1);
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Mon Feb 11 05:51:20 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: Merge siginfo6 into other PT_STEP tests in t_ptrace_wait* To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.80 src/tests/lib/libc/sys/t_ptrace_wait.c:1.81 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.80 Mon Feb 11 04:20:06 2019 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Mon Feb 11 05:51:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.80 2019/02/11 04:20:06 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.81 2019/02/11 05:51:20 kamil Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.80 2019/02/11 04:20:06 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.81 2019/02/11 05:51:20 kamil Exp $"); #include #include @@ -2757,6 +2757,7 @@ ptrace_step(int N, int setstep) int status; #endif int happy; + struct ptrace_siginfo info; #if defined(__arm__) /* PT_STEP not supported on arm 32-bit */ @@ -2786,6 +2787,14 @@ ptrace_step(int N, int setstep) validate_status_stopped(status, sigval); + DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + SYSCALL_REQUIRE( + ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); + + DPRINTF("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); + while (N --> 0) { if (setstep) { DPRINTF("Before resuming the child process where it " @@ -2808,6 +2817,14 @@ ptrace_step(int N, int setstep) validate_status_stopped(status, SIGTRAP); + DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + SYSCALL_REQUIRE( + ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); + + DPRINTF("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_TRACE); + if (setstep) { SYSCALL_REQUIRE(ptrace(PT_CLEARSTEP, child, 0, 0) != -1); } @@ -3473,94 +3490,6 @@ ATF_TC_BODY(siginfo4, tc) TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } -#if defined(PT_STEP) -ATF_TC(siginfo6); -ATF_TC_HEAD(siginfo6, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Verify single PT_STEP call with signal information check"); -} - -ATF_TC_BODY(siginfo6, tc) -{ - const int exitval = 5; - const int sigval = SIGSTOP; - pid_t child, wpid; -#if defined(TWAIT_HAVE_STATUS) - int status; -#endif - int happy; - struct ptrace_siginfo info; - -#if defined(__arm__) - /* PT_STEP not supported on arm 32-bit */ - atf_tc_expect_fail("PR kern/52119"); -#endif - - memset(, 0, sizeof(info)); - - DPRINTF("Before forking process PID=%d\n", getpid()); - SYSCALL_REQUIRE((child = fork()) != -1); - if (child == 0) { - DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); - FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); - - happy = check_happy(100); - - DPRINTF("Before raising %s from child\n", strsignal(sigval)); - FORKEE_ASSERT(raise(sigval) == 0); - - FORKEE_ASSERT_EQ(happy, check_happy(100)); - - DPRINTF("Before exiting of the child process\n"); - _exit(exitval); - } - DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, sigval); - - DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); - SYSCALL_REQUIRE( - ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); - - DPRINTF("Before checking siginfo_t\n"); - ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); - ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); - - DPRINTF("Before resuming the child process where it left off and " - "without signal to be sent (use PT_STEP)\n"); - SYSCALL_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, SIGTRAP); - - DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); - SYSCALL_REQUIRE( - ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); - - DPRINTF("Before checking siginfo_t\n"); - ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP); - ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_TRACE); - - DPRINTF("Before resuming the child process where it left off and " - "without signal to be sent\n"); - SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); -
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Mon Feb 11 04:20:06 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: Drop siginfo5 from ATF tests in t_ptrace_wait* siginfo5 duplicates older tests verifying PTRACE_FORK. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.79 src/tests/lib/libc/sys/t_ptrace_wait.c:1.80 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.79 Mon Feb 11 04:13:28 2019 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Mon Feb 11 04:20:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.79 2019/02/11 04:13:28 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.80 2019/02/11 04:20:06 kamil Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.79 2019/02/11 04:13:28 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.80 2019/02/11 04:20:06 kamil Exp $"); #include #include @@ -3414,7 +3414,6 @@ PTRACE_SIGINFO(siginfo_set_faked, true) /// - ATF_TC(siginfo4); ATF_TC_HEAD(siginfo4, tc) { @@ -3474,171 +3473,6 @@ ATF_TC_BODY(siginfo4, tc) TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); } -#if defined(TWAIT_HAVE_PID) -ATF_TC(siginfo5); -ATF_TC_HEAD(siginfo5, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Verify that fork(2) is intercepted by ptrace(2) with EVENT_MASK " - "set to PTRACE_FORK and reports correct signal information"); -} - -ATF_TC_BODY(siginfo5, tc) -{ - const int exitval = 5; - const int exitval2 = 15; - const int sigval = SIGSTOP; - pid_t child, child2, wpid; -#if defined(TWAIT_HAVE_STATUS) - int status; -#endif - ptrace_state_t state; - const int slen = sizeof(state); - ptrace_event_t event; - const int elen = sizeof(event); - struct ptrace_siginfo info; - - memset(, 0, sizeof(info)); - - DPRINTF("Before forking process PID=%d\n", getpid()); - SYSCALL_REQUIRE((child = fork()) != -1); - if (child == 0) { - DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); - FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); - - DPRINTF("Before raising %s from child\n", strsignal(sigval)); - FORKEE_ASSERT(raise(sigval) == 0); - - FORKEE_ASSERT((child2 = fork()) != -1); - - if (child2 == 0) - _exit(exitval2); - - FORKEE_REQUIRE_SUCCESS - (wpid = TWAIT_GENERIC(child2, , 0), child2); - - forkee_status_exited(status, exitval2); - - DPRINTF("Before exiting of the child process\n"); - _exit(exitval); - } - DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, sigval); - - DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); - SYSCALL_REQUIRE( - ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); - - DPRINTF("Before checking siginfo_t\n"); - ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); - ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); - - DPRINTF("Enable PTRACE_FORK in EVENT_MASK for the child %d\n", child); - event.pe_set_event = PTRACE_FORK; - SYSCALL_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, , elen) != -1); - - DPRINTF("Before resuming the child process where it left off and " - "without signal to be sent\n"); -DPRINTF("We expect two SIGTRAP events, for child %d (TRAP_CHLD, " - "pe_report_event=PTRACE_FORK, state.pe_other_pid=child2) and " - "for child2 (TRAP_CHLD, pe_report_event=PTRACE_FORK, " -"state.pe_other_pid=child)\n", child); - SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); - - DPRINTF("Before calling %s() for the child %d\n", TWAIT_FNAME, child); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, SIGTRAP); - - DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); - SYSCALL_REQUIRE( - ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); - - DPRINTF("Before checking siginfo_t\n"); - ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP); - ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_CHLD); - - SYSCALL_REQUIRE( - ptrace(PT_GET_PROCESS_STATE, child, , slen) != -1); - ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK); - - child2 = state.pe_other_pid; - DPRINTF("Reported PTRACE_FORK event with forkee %d\n", child2); - - DPRINTF("Before calling %s() for the forkee %d of the child %d\n", - TWAIT_FNAME, child2, child); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, , 0), - child2); - - validate_status_stopped(status, SIGTRAP); - - DPRINTF("Before calling ptrace(2)
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kamil Date: Mon Feb 11 04:13:28 UTC 2019 Modified Files: src/tests/lib/libc/sys: t_ptrace_wait.c Log Message: Initial refactoring of siginfo* tests in t_ptrace_wait* Drop test siginfo1 as duplicated with earlier tests. Rework and rename siginfo2 and siginfo3 into a single test body. New tests: - siginfo_set_unmodified (replaces siginfo2) - siginfo_set_faked (replaces siginfo3) All new tests pass. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/tests/lib/libc/sys/t_ptrace_wait.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_wait.c diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.78 src/tests/lib/libc/sys/t_ptrace_wait.c:1.79 --- src/tests/lib/libc/sys/t_ptrace_wait.c:1.78 Sun Feb 10 02:13:45 2019 +++ src/tests/lib/libc/sys/t_ptrace_wait.c Mon Feb 11 04:13:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_wait.c,v 1.78 2019/02/10 02:13:45 kamil Exp $ */ +/* $NetBSD: t_ptrace_wait.c,v 1.79 2019/02/11 04:13:28 kamil Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_ptrace_wait.c,v 1.78 2019/02/10 02:13:45 kamil Exp $"); +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.79 2019/02/11 04:13:28 kamil Exp $"); #include #include @@ -3288,168 +3288,8 @@ ATTACH_LWPINFO(attach_lwpinfo3, 3) /// -ATF_TC(siginfo1); -ATF_TC_HEAD(siginfo1, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Verify basic PT_GET_SIGINFO call for SIGTRAP from tracee"); -} - -ATF_TC_BODY(siginfo1, tc) -{ - const int exitval = 5; - const int sigval = SIGTRAP; - pid_t child, wpid; -#if defined(TWAIT_HAVE_STATUS) - int status; -#endif - struct ptrace_siginfo info; - memset(, 0, sizeof(info)); - - DPRINTF("Before forking process PID=%d\n", getpid()); - SYSCALL_REQUIRE((child = fork()) != -1); - if (child == 0) { - DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); - FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); - - DPRINTF("Before raising %s from child\n", strsignal(sigval)); - FORKEE_ASSERT(raise(sigval) == 0); - - DPRINTF("Before exiting of the child process\n"); - _exit(exitval); - } - DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, sigval); - - DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); - SYSCALL_REQUIRE(ptrace(PT_GET_SIGINFO, child, , sizeof(info)) != -1); - - DPRINTF("Signal traced to lwpid=%d\n", info.psi_lwpid); - DPRINTF("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n", - info.psi_siginfo.si_signo, info.psi_siginfo.si_code, - info.psi_siginfo.si_errno); - - DPRINTF("Before resuming the child process where it left off and " - "without signal to be sent\n"); - SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_exited(status, exitval); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, , 0)); -} - -ATF_TC(siginfo2); -ATF_TC_HEAD(siginfo2, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls without " - "modification of SIGINT from tracee"); -} - -static int siginfo2_caught = 0; - -static void -siginfo2_sighandler(int sig) -{ - FORKEE_ASSERT_EQ(sig, SIGINT); - - ++siginfo2_caught; -} - -ATF_TC_BODY(siginfo2, tc) -{ - const int exitval = 5; - const int sigval = SIGINT; - pid_t child, wpid; - struct sigaction sa; -#if defined(TWAIT_HAVE_STATUS) - int status; -#endif - struct ptrace_siginfo info; - memset(, 0, sizeof(info)); - - DPRINTF("Before forking process PID=%d\n", getpid()); - SYSCALL_REQUIRE((child = fork()) != -1); - if (child == 0) { - DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid()); - FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); - - sa.sa_handler = siginfo2_sighandler; - sa.sa_flags = SA_SIGINFO; - sigemptyset(_mask); - - FORKEE_ASSERT(sigaction(sigval, , NULL) != -1); - - DPRINTF("Before raising %s from child\n", strsignal(sigval)); - FORKEE_ASSERT(raise(sigval) == 0); - - FORKEE_ASSERT_EQ(siginfo2_caught, 1); - - DPRINTF("Before exiting of the child process\n"); - _exit(exitval); - } - DPRINTF("Parent process PID=%d, child's PID=%d\n", getpid(), child); - - DPRINTF("Before calling %s() for the child\n", TWAIT_FNAME); - TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, , 0), child); - - validate_status_stopped(status, sigval); - - DPRINTF("Before calling ptrace(2) with PT_GET_SIGINFO for
CVS commit: src/external/gpl2/xcvs/dist/doc
Module Name:src Committed By: gutteridge Date: Sun Feb 10 22:36:27 UTC 2019 Modified Files: src/external/gpl2/xcvs/dist/doc: cvs.1 cvs.texinfo Log Message: cvs.1 & cvs.texinfo: add missing sections documenting the "add" and "remove" commands. These were never present upstream on the branch NetBSD imported, but were subsequently added on other branches (against upstream's HEAD: cvs.1: r. 1.53 & cvs.texinfo: r. 1.697). XXX While cvs.texinfo is supposed to be used to auto-generate cvs.1, that isn't safe at present, because content has been added direct to cvs.1 in NetBSD's tree. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl2/xcvs/dist/doc/cvs.1 cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/doc/cvs.texinfo Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/doc/cvs.1 diff -u src/external/gpl2/xcvs/dist/doc/cvs.1:1.4 src/external/gpl2/xcvs/dist/doc/cvs.1:1.5 --- src/external/gpl2/xcvs/dist/doc/cvs.1:1.4 Fri Jan 20 16:54:11 2017 +++ src/external/gpl2/xcvs/dist/doc/cvs.1 Sun Feb 10 22:36:27 2019 @@ -674,6 +674,111 @@ Available with the following commands: \ and \fBupdate\fR. .SP .SP +.SH "add" +.SS "Add files and directories to the repository" +.IX "add (subcommand)" +.SP +.IP "\(bu" 2 +Synopsis: add [-k rcs-kflag] [-m message] files... +.IP "\(bu" 2 +Requires: repository, working directory. +.IP "\(bu" 2 +Changes: repository, working directory. +.SP +The \fBadd\fR command is used to present new files +and directories for addition into the \fBcvs\fR +repository. When \fBadd\fR is used on a directory, +a new directory is created in the repository +immediately. When used on a file, only the working +directory is updated. Changes to the repository are +not made until the \fBcommit\fR command is used on +the newly added file. +.SP +The \fBadd\fR command also resurrects files that +have been previously removed. This can be done +before or after the \fBcommit\fR command is used +to finalize the removal of files. Resurrected files +are restored into the working directory at the time +the \fBadd\fR command is executed. +.SP +.SH "add options" +.SP +These standard options are supported by \fBadd\fR +(see node `Common options\(aq in the CVS manual, for a complete description of +them): +.SP +.IP "" 0 +\fB-k \fIkflag\fB\fR +.IP "" 2 +Process keywords according to \fIkflag\fR. See +see node `Keyword substitution\(aq in the CVS manual. +This option is sticky; future updates of +this file in this working directory will use the same +\fIkflag\fR. The \fBstatus\fR command can be viewed +to see the sticky options. For more information on +the \fBstatus\fR command, see node `Invoking CVS\(aq in the CVS manual. +.SP +.IP "" 0 +\fB-m \fImessage\fB\fR +.IP "" 2 +Use \fImessage\fR as the log message, instead of +invoking an editor. +.SP +.SH "add examples" +.SP +.SS "Adding a directory" +.SP +.PD 0 +.SP +.IP "" 2 +$ mkdir doc +.IP "" 2 +$ cvs add doc +.IP "" 2 +Directory /path/to/repository/doc added to the repository + +.PD +.IP "" 0 +.SP +.SS "Adding a file" +.SP +.PD 0 +.SP +.SP +.IP "" 2 +$ >TODO +.IP "" 2 +$ cvs add TODO +.IP "" 2 +cvs add: scheduling file \`TODO\(aq for addition +.IP "" 2 +cvs add: use \(aqcvs commit\(aq to add this file permanently + +.PD +.IP "" 0 +.SP +.SS "Undoing a \fBremove\fR command" +.SP +.PD 0 +.SP +.IP "" 2 +$ rm -f makefile +.IP "" 2 +$ cvs remove makefile +.IP "" 2 +cvs remove: scheduling \`makefile\(aq for removal +.IP "" 2 +cvs remove: use \(aqcvs commit\(aq to remove this file permanently +.IP "" 2 +$ cvs add makefile +.IP "" 2 +U makefile +.IP "" 2 +cvs add: makefile, version 1.2, resurrected + +.PD +.IP "" 0 +.SP .SH "admin" .SS "Administration" .IX "Admin (subcommand)" @@ -3624,6 +3729,131 @@ $ .PD .IP "" 0 .SP +.SH "remove" +.SS "Remove files from active use" +.IX "remove (subcommand)" +.SP +.IP "\(bu" 2 +Synopsis: remove [-flR] [files...] +.IP "\(bu" 2 +Requires: repository, working directory. +.IP "\(bu" 2 +Changes: working directory. +.SP +The \fBremove\fR command is used to remove unwanted +files from active use. The user normally deletes the +files from the working directory prior to invocation +of the \fBremove\fR command. Only the working +directory is updated. Changes to the repository are +not made until the \fBcommit\fR command is run. +.SP +The \fBremove\fR command does not delete files from +from the repository. \fBcvs\fR keeps all historical +data in the repository so that it is possible to +reconstruct previous states of the projects under +revision control. +.SP +To undo \fBcvs\fR \fBremove\fR or to resurrect files +that were previously removed, see node `add\(aq in the CVS manual. +.SP +.SH "remove options" +.SP +These standard options are supported by \fBremove\fR +(see node `Common options\(aq in the CVS manual for a complete description of +them): +.SP +.IP "" 0 +\fB-l\fR
CVS commit: src/lib/libnvmm
Module Name:src Committed By: christos Date: Sun Feb 10 19:30:28 UTC 2019 Modified Files: src/lib/libnvmm: libnvmm_x86.c Log Message: is not legal. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libnvmm/libnvmm_x86.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnvmm/libnvmm_x86.c diff -u src/lib/libnvmm/libnvmm_x86.c:1.19 src/lib/libnvmm/libnvmm_x86.c:1.20 --- src/lib/libnvmm/libnvmm_x86.c:1.19 Thu Feb 7 05:58:45 2019 +++ src/lib/libnvmm/libnvmm_x86.c Sun Feb 10 14:30:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: libnvmm_x86.c,v 1.19 2019/02/07 10:58:45 maxv Exp $ */ +/* $NetBSD: libnvmm_x86.c,v 1.20 2019/02/10 19:30:28 christos Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -2584,7 +2584,7 @@ x86_decode(uint8_t *inst_bytes, size_t i #define EXEC_INSTR(sz, instr) \ static uint##sz##_t \ -exec_##instrsz(uint##sz##_t op1, uint##sz##_t op2, uint64_t *rflags)\ +exec_##instr##sz(uint##sz##_t op1, uint##sz##_t op2, uint64_t *rflags) \ { \ uint##sz##_t res; \ __asm __volatile ( \
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jdolecek Date: Sun Feb 10 19:23:55 UTC 2019 Modified Files: src/sys/dev/usb: umass.c umass_isdata.c umass_scsipi.c umass_scsipi.h Log Message: move the deallocation of the protocol-specific softc into its own detach hook, so that calls to kmem_alloc() and kmem_free() would agree on the size fixes panic on umass detach reported by Tom Ivar Helbekkmo on current-users@ To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/sys/dev/usb/umass.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/umass_isdata.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/usb/umass_scsipi.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/umass_scsipi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/umass.c diff -u src/sys/dev/usb/umass.c:1.173 src/sys/dev/usb/umass.c:1.174 --- src/sys/dev/usb/umass.c:1.173 Thu Feb 7 13:48:27 2019 +++ src/sys/dev/usb/umass.c Sun Feb 10 19:23:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: umass.c,v 1.173 2019/02/07 13:48:27 skrll Exp $ */ +/* $NetBSD: umass.c,v 1.174 2019/02/10 19:23:55 jdolecek Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -124,7 +124,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.173 2019/02/07 13:48:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.174 2019/02/10 19:23:55 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -828,6 +828,24 @@ umass_detach(device_t self, int flags) rv = config_detach(scbus->sc_child, flags); switch (sc->sc_cmd) { + case UMASS_CPROTO_RBC: + case UMASS_CPROTO_SCSI: +#if NSCSIBUS > 0 + umass_scsi_detach(sc); +#else + aprint_error_dev(self, "scsibus not configured\n"); +#endif + break; + + case UMASS_CPROTO_UFI: + case UMASS_CPROTO_ATAPI: +#if NATAPIBUS > 0 + umass_atapi_detach(sc); +#else + aprint_error_dev(self, "atapibus not configured\n"); +#endif + break; + case UMASS_CPROTO_ISD_ATA: #if NWD > 0 umass_isdata_detach(sc); @@ -841,8 +859,8 @@ umass_detach(device_t self, int flags) break; } - kmem_free(scbus, sizeof(*scbus)); - sc->bus = NULL; + /* protocol detach is expected to free sc->bus */ + KASSERT(sc->bus == NULL); } if (rv != 0) Index: src/sys/dev/usb/umass_isdata.c diff -u src/sys/dev/usb/umass_isdata.c:1.41 src/sys/dev/usb/umass_isdata.c:1.42 --- src/sys/dev/usb/umass_isdata.c:1.41 Thu Feb 7 13:48:27 2019 +++ src/sys/dev/usb/umass_isdata.c Sun Feb 10 19:23:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: umass_isdata.c,v 1.41 2019/02/07 13:48:27 skrll Exp $ */ +/* $NetBSD: umass_isdata.c,v 1.42 2019/02/10 19:23:55 jdolecek Exp $ */ /* * TODO: @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_isdata.c,v 1.41 2019/02/07 13:48:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_isdata.c,v 1.42 2019/02/10 19:23:55 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -244,6 +244,9 @@ umass_isdata_detach(struct umass_softc * struct uisdata_softc *scbus = (struct uisdata_softc *)sc->bus; ata_channel_destroy(>sc_channel); + + kmem_free(scbus, sizeof(*scbus)); + sc->bus = NULL; } void Index: src/sys/dev/usb/umass_scsipi.c diff -u src/sys/dev/usb/umass_scsipi.c:1.59 src/sys/dev/usb/umass_scsipi.c:1.60 --- src/sys/dev/usb/umass_scsipi.c:1.59 Thu Feb 7 13:48:27 2019 +++ src/sys/dev/usb/umass_scsipi.c Sun Feb 10 19:23:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: umass_scsipi.c,v 1.59 2019/02/07 13:48:27 skrll Exp $ */ +/* $NetBSD: umass_scsipi.c,v 1.60 2019/02/10 19:23:55 jdolecek Exp $ */ /* * Copyright (c) 2001, 2003, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.59 2019/02/07 13:48:27 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.60 2019/02/10 19:23:55 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -151,6 +151,15 @@ umass_scsi_attach(struct umass_softc *sc return 0; } + +void +umass_scsi_detach(struct umass_softc *sc) +{ + struct umass_scsipi_softc *scbus = (struct umass_scsipi_softc *)sc->bus; + + kmem_free(scbus, sizeof(*scbus)); + sc->bus = NULL; +} #endif #if NATAPIBUS > 0 @@ -183,6 +192,15 @@ umass_atapi_attach(struct umass_softc *s return 0; } + +void +umass_atapi_detach(struct umass_softc *sc) +{ + struct umass_scsipi_softc *scbus = (struct umass_scsipi_softc *)sc->bus; + + kmem_free(scbus, sizeof(*scbus)); + sc->bus = NULL; +} #endif Static struct umass_scsipi_softc * Index: src/sys/dev/usb/umass_scsipi.h diff -u src/sys/dev/usb/umass_scsipi.h:1.3 src/sys/dev/usb/umass_scsipi.h:1.4 --- src/sys/dev/usb/umass_scsipi.h:1.3 Sat Apr 23 10:15:32 2016 +++ src/sys/dev/usb/umass_scsipi.h Sun Feb 10 19:23:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: umass_scsipi.h,v 1.3 2016/04/23 10:15:32 skrll Exp $ */ +/* $NetBSD: umass_scsipi.h,v 1.4 2019/02/10 19:23:55 jdolecek Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,4
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Sun Feb 10 19:21:52 UTC 2019 Modified Files: src/bin/sh: histedit.c Log Message: Remove a function prototype which was added to in 2005. I think we can trust it to be stable by now, and doin't need the dup. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/bin/sh/histedit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/histedit.c diff -u src/bin/sh/histedit.c:1.54 src/bin/sh/histedit.c:1.55 --- src/bin/sh/histedit.c:1.54 Sat Feb 9 03:35:55 2019 +++ src/bin/sh/histedit.c Sun Feb 10 19:21:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: histedit.c,v 1.54 2019/02/09 03:35:55 kre Exp $ */ +/* $NetBSD: histedit.c,v 1.55 2019/02/10 19:21:52 kre Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: histedit.c,v 1.54 2019/02/09 03:35:55 kre Exp $"); +__RCSID("$NetBSD: histedit.c,v 1.55 2019/02/10 19:21:52 kre Exp $"); #endif #endif /* not lint */ @@ -71,7 +71,6 @@ History *hist; /* history cookie */ EditLine *el; /* editline cookie */ int displayhist; static FILE *el_in, *el_out; -unsigned char _el_fn_complete(EditLine *, int); STATIC const char *fc_replace(const char *, char *, char *);
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sun Feb 10 17:15:45 UTC 2019 Modified Files: src/share/man/man9: pool.9 Log Message: document PR_ZERO To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/share/man/man9/pool.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pool.9 diff -u src/share/man/man9/pool.9:1.46 src/share/man/man9/pool.9:1.47 --- src/share/man/man9/pool.9:1.46 Sat Dec 24 09:04:10 2016 +++ src/share/man/man9/pool.9 Sun Feb 10 12:15:45 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: pool.9,v 1.46 2016/12/24 14:04:10 abhinav Exp $ +.\" $NetBSD: pool.9,v 1.47 2019/02/10 17:15:45 christos Exp $ .\" .\" Copyright (c) 1997, 1998, 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 15, 2015 +.Dd February 10, 2019 .Dt POOL 9 .Os .Sh NAME @@ -167,6 +167,10 @@ will return .Dv NULL without waiting, allowing the caller to do its own garbage collection; however, it will still wait if the pool is not yet at its hard limit. +If the +.Dv PR_ZERO +flag is specified, then the memory returned will be zeroed first using +.Xr memset 3 . .El .Ss RETURNING ITEMS TO A POOL .Fn pool_put
CVS commit: src/sys
Module Name:src Committed By: christos Date: Sun Feb 10 17:13:33 UTC 2019 Modified Files: src/sys/dev/dmover: dmover_io.c src/sys/dev/ic: ncr53c9x.c wd33c93.c src/sys/dev/raidframe: rf_alloclist.c rf_callback.c rf_dagutils.c rf_diskqueue.c rf_map.c rf_psstatus.c src/sys/kern: kern_time.c subr_pool.c sys_aio.c vfs_dirhash.c src/sys/sys: pool.h Log Message: Introduce PR_ZERO to avoid open-coding memset()s everywhere. OK riastradh@. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/dmover/dmover_io.c cvs rdiff -u -r1.150 -r1.151 src/sys/dev/ic/ncr53c9x.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/wd33c93.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/raidframe/rf_alloclist.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/raidframe/rf_callback.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/raidframe/rf_dagutils.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/raidframe/rf_diskqueue.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/raidframe/rf_map.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/raidframe/rf_psstatus.c cvs rdiff -u -r1.194 -r1.195 src/sys/kern/kern_time.c cvs rdiff -u -r1.231 -r1.232 src/sys/kern/subr_pool.c cvs rdiff -u -r1.43 -r1.44 src/sys/kern/sys_aio.c cvs rdiff -u -r1.12 -r1.13 src/sys/kern/vfs_dirhash.c cvs rdiff -u -r1.83 -r1.84 src/sys/sys/pool.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dmover/dmover_io.c diff -u src/sys/dev/dmover/dmover_io.c:1.45 src/sys/dev/dmover/dmover_io.c:1.46 --- src/sys/dev/dmover/dmover_io.c:1.45 Thu Nov 30 15:25:55 2017 +++ src/sys/dev/dmover/dmover_io.c Sun Feb 10 12:13:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dmover_io.c,v 1.45 2017/11/30 20:25:55 christos Exp $ */ +/* $NetBSD: dmover_io.c,v 1.46 2019/02/10 17:13:33 christos Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.45 2017/11/30 20:25:55 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.46 2019/02/10 17:13:33 christos Exp $"); #include #include @@ -180,9 +180,7 @@ dmio_state_get(void) { struct dmio_state *ds; - ds = pool_get(_state_pool, PR_WAITOK); - - memset(ds, 0, sizeof(*ds)); + ds = pool_get(_state_pool, PR_WAITOK | PR_ZERO); getnanotime(>ds_btime); ds->ds_atime = ds->ds_mtime = ds->ds_btime; Index: src/sys/dev/ic/ncr53c9x.c diff -u src/sys/dev/ic/ncr53c9x.c:1.150 src/sys/dev/ic/ncr53c9x.c:1.151 --- src/sys/dev/ic/ncr53c9x.c:1.150 Sat Feb 2 22:19:27 2019 +++ src/sys/dev/ic/ncr53c9x.c Sun Feb 10 12:13:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9x.c,v 1.150 2019/02/03 03:19:27 mrg Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.151 2019/02/10 17:13:33 christos Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.150 2019/02/03 03:19:27 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.151 2019/02/10 17:13:33 christos Exp $"); #include #include @@ -843,12 +843,10 @@ ncr53c9x_get_ecb(struct ncr53c9x_softc * int s; s = splbio(); - ecb = pool_get(_pool, PR_NOWAIT); - splx(s); - if (ecb) { - memset(ecb, 0, sizeof(*ecb)); + ecb = pool_get(_pool, PR_NOWAIT | PR_ZERO); + if (ecb) ecb->flags |= ECB_ALLOC; - } + splx(s); return ecb; } Index: src/sys/dev/ic/wd33c93.c diff -u src/sys/dev/ic/wd33c93.c:1.27 src/sys/dev/ic/wd33c93.c:1.28 --- src/sys/dev/ic/wd33c93.c:1.27 Thu Feb 8 04:05:19 2018 +++ src/sys/dev/ic/wd33c93.c Sun Feb 10 12:13:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wd33c93.c,v 1.27 2018/02/08 09:05:19 dholland Exp $ */ +/* $NetBSD: wd33c93.c,v 1.28 2019/02/10 17:13:33 christos Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd33c93.c,v 1.27 2018/02/08 09:05:19 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd33c93.c,v 1.28 2019/02/10 17:13:33 christos Exp $"); #include "opt_ddb.h" @@ -570,7 +570,7 @@ wd33c93_scsi_request(struct scsipi_chann panic("wd33c93_scsicmd: busy"); s = splbio(); - acb = (struct wd33c93_acb *)pool_get(_pool, PR_NOWAIT); + acb = pool_get(_pool, PR_NOWAIT); splx(s); if (acb == NULL) { Index: src/sys/dev/raidframe/rf_alloclist.c diff -u src/sys/dev/raidframe/rf_alloclist.c:1.27 src/sys/dev/raidframe/rf_alloclist.c:1.28 --- src/sys/dev/raidframe/rf_alloclist.c:1.27 Fri Feb 8 22:33:59 2019 +++ src/sys/dev/raidframe/rf_alloclist.c Sun Feb 10 12:13:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_alloclist.c,v 1.27 2019/02/09 03:33:59 christos Exp $ */ +/* $NetBSD: rf_alloclist.c,v 1.28 2019/02/10 17:13:33 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,7 +37,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_alloclist.c,v 1.27 2019/02/09
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sun Feb 10 13:41:35 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1186 To generate a diff of this commit: cvs rdiff -u -r1.1.2.104 -r1.1.2.105 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.104 src/doc/CHANGES-8.1:1.1.2.105 --- src/doc/CHANGES-8.1:1.1.2.104 Sat Feb 9 14:43:40 2019 +++ src/doc/CHANGES-8.1 Sun Feb 10 13:41:35 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.104 2019/02/09 14:43:40 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.105 2019/02/10 13:41:35 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2437,4 +2437,13 @@ sys/compat/ossaudio/ossaudio.c 1.71 Fix SNDCTL_DSP_GETOSPACE. [isaki, ticket #1185] +lib/libperfuse/debug.c1.13 +lib/libperfuse/ops.c1.85 +lib/libperfuse/ops.c1.86 +lib/libperfuse/perfuse.c 1.41 +lib/libperfuse/perfuse_priv.h 1.37 + + Use reclaim2 to fix reclaim/lookup race conditions. + Fix directory filehandle usage with libufse. Fix lookup count. + [manu, ticket #1186]
CVS commit: [netbsd-8] src/lib/libperfuse
Module Name:src Committed By: martin Date: Sun Feb 10 13:40:41 UTC 2019 Modified Files: src/lib/libperfuse [netbsd-8]: debug.c ops.c perfuse.c perfuse_priv.h Log Message: Pull up following revision(s) (requested by manu in ticket #1186): lib/libperfuse/perfuse.c: revision 1.41 lib/libperfuse/perfuse_priv.h: revision 1.37 lib/libperfuse/ops.c: revision 1.85 lib/libperfuse/ops.c: revision 1.86 lib/libperfuse/debug.c: revision 1.13 Use reclaim2 to fix reclaim/lookup race conditions The PUFFS reclaim operation had a race condition with lookups: we could be asked to lookup a node, then to reclaim it before lookup completion. At lookup completion, we would then create a leaked node. Enter the PUFFS reclaim2 operation, which features a nlookup argument. That let us count how many lookups are pending and avoid the above described scenario. It also makes the codes simplier. - Fix directory filehandle usage with libufse. Fix lookup count libfuse does not use filehandle the same way for directories and other objects. As a result, filehandles obtained by OPENDIR should not be sent on non-directory related operations like READ/WRITE/GETATTR... While there, fix the lookup count sent to the FORGET operation, which led to leaked nodes. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.24.1 src/lib/libperfuse/debug.c cvs rdiff -u -r1.84 -r1.84.8.1 src/lib/libperfuse/ops.c cvs rdiff -u -r1.40 -r1.40.6.1 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.36 -r1.36.8.1 src/lib/libperfuse/perfuse_priv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/debug.c diff -u src/lib/libperfuse/debug.c:1.12 src/lib/libperfuse/debug.c:1.12.24.1 --- src/lib/libperfuse/debug.c:1.12 Sat Jul 21 05:49:42 2012 +++ src/lib/libperfuse/debug.c Sun Feb 10 13:40:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: debug.c,v 1.12 2012/07/21 05:49:42 manu Exp $ */ +/* $NetBSD: debug.c,v 1.12.24.1 2019/02/10 13:40:41 martin Exp $ */ /*- * Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. @@ -270,7 +270,6 @@ perfuse_trace_dump(struct puffs_usermoun fprintf(fp, "\n\nGlobal statistics\n"); fprintf(fp, "Nodes: %d\n", ps->ps_nodecount); fprintf(fp, "Exchanges: %d\n", ps->ps_xchgcount); - fprintf(fp, "Nodes possibly leaked: %d\n", ps->ps_nodeleakcount); (void)fflush(fp); return; Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.84 src/lib/libperfuse/ops.c:1.84.8.1 --- src/lib/libperfuse/ops.c:1.84 Wed Jun 3 14:07:05 2015 +++ src/lib/libperfuse/ops.c Sun Feb 10 13:40:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.84 2015/06/03 14:07:05 manu Exp $ */ +/* $NetBSD: ops.c,v 1.84.8.1 2019/02/10 13:40:41 martin Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -105,6 +105,9 @@ const int vttoif_tab[9] = { #define IFTOVT(mode) (iftovt_tab[((mode) & S_IFMT) >> 12]) #define VTTOIF(indx) (vttoif_tab[(int)(indx)]) +#define PN_ISDIR(opc) \ + (puffs_pn_getvap((struct puffs_node *)opc)->va_type == VDIR) + #if 0 static void print_node(const char *func, puffs_cookie_t opc) @@ -141,7 +144,7 @@ perfuse_node_close_common(struct puffs_u pn = (struct puffs_node *)opc; pnd = PERFUSE_NODE_DATA(pn); - if (puffs_pn_getvap(pn)->va_type == VDIR) { + if (PN_ISDIR(opc)) { op = FUSE_RELEASEDIR; mode = FREAD; } else { @@ -479,13 +482,14 @@ node_lookup_common(struct puffs_usermoun fuse_attr_to_vap(ps, >pn_va, >attr); pn->pn_va.va_gen = (u_long)(feo->generation); PERFUSE_NODE_DATA(pn)->pnd_fuse_nlookup++; + PERFUSE_NODE_DATA(pn)->pnd_puffs_nlookup++; *pnp = pn; #ifdef PERFUSE_DEBUG if (perfuse_diagflags & PDF_FILENAME) DPRINTF("%s: opc = %p, looked up opc = %p, " - "nodeid = 0x%"PRIx64" file = \"%s\"\n", __func__, + "nodeid = 0x%"PRIx64" file = \"%s\"\n", __func__, (void *)opc, pn, feo->nodeid, path); #endif @@ -500,11 +504,6 @@ node_lookup_common(struct puffs_usermoun puffs_newinfo_setrdev(pni, pn->pn_va.va_rdev); } - if (PERFUSE_NODE_DATA(pn)->pnd_flags & PND_NODELEAK) { - PERFUSE_NODE_DATA(pn)->pnd_flags &= ~PND_NODELEAK; - ps->ps_nodeleakcount--; - } - ps->ps_destroy_msg(pm); return 0; @@ -538,6 +537,7 @@ node_mk_common(struct puffs_usermount *p pn = perfuse_new_pn(pu, pcn->pcn_name, opc); PERFUSE_NODE_DATA(pn)->pnd_nodeid = feo->nodeid; + PERFUSE_NODE_DATA(pn)->pnd_fuse_nlookup++; PERFUSE_NODE_DATA(pn)->pnd_puffs_nlookup++; perfuse_node_cache(ps, pn); @@ -672,7 +672,7 @@ fuse_to_dirent(struct puffs_usermount *p "failed: %d", name, error); } else { fd->ino = pn->pn_va.va_fileid; - (void)perfuse_node_reclaim(pu, pn); + (void)perfuse_node_reclaim2(pu, pn, 1); } } } @@ -1135,7 +1135,7 @@ perfuse_node_lookup(struct puffs_usermou case NAMEI_RENAME: error = sticky_access(opc, pn, pcn->pcn_cred); if
CVS commit: src/sys/arch/xen/include
Module Name:src Committed By: cherry Date: Sun Feb 10 11:10:34 UTC 2019 Modified Files: src/sys/arch/xen/include/amd64: hypercalls.h src/sys/arch/xen/include/i386: hypercalls.h Log Message: Catchup hypercall interfaces for HYPERVISOR_sched_op which use arguments to __XEN_INTERFACE_VERSION__ >= 0x00030201 We've been using the sched_op_compat API with sched_op arguments. fixes PR port-xen/53965 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/xen/include/amd64/hypercalls.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/xen/include/i386/hypercalls.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/include/amd64/hypercalls.h diff -u src/sys/arch/xen/include/amd64/hypercalls.h:1.11 src/sys/arch/xen/include/amd64/hypercalls.h:1.12 --- src/sys/arch/xen/include/amd64/hypercalls.h:1.11 Sat Feb 2 12:32:55 2019 +++ src/sys/arch/xen/include/amd64/hypercalls.h Sun Feb 10 11:10:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hypercalls.h,v 1.11 2019/02/02 12:32:55 cherry Exp $ */ +/* $NetBSD: hypercalls.h,v 1.12 2019/02/10 11:10:34 cherry Exp $ */ /** * hypercall.h * @@ -320,8 +320,18 @@ static inline int HYPERVISOR_suspend( unsigned long srec) { +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + + struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_suspend, + }; + + return _hypercall3(int, sched_op, SCHEDOP_shutdown, + _reason, srec); +#else return _hypercall3(int, sched_op, SCHEDOP_shutdown, SHUTDOWN_suspend, srec); +#endif } static inline long @@ -342,21 +352,51 @@ static inline long HYPERVISOR_shutdown( void) { - return _hypercall2(int, sched_op, SCHEDOP_shutdown, SHUTDOWN_poweroff); +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + + struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_poweroff, + }; + + return _hypercall2(int, sched_op, SCHEDOP_shutdown, + _reason); +#else +- return _hypercall2(int, sched_op, SCHEDOP_shutdown, SHUTDOWN_poweroff); +#endif } static inline long HYPERVISOR_crash( void) { +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + + struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_crash, + }; + + return _hypercall2(int, sched_op, SCHEDOP_shutdown, + _reason); +#else return _hypercall2(int, sched_op, SCHEDOP_shutdown, SHUTDOWN_crash); +#endif } static inline long HYPERVISOR_reboot( void) { +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + + struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_reboot, + }; + + return _hypercall2(int, sched_op, SCHEDOP_shutdown, + _reason); +#else return _hypercall2(int, sched_op, SCHEDOP_shutdown, SHUTDOWN_reboot); +#endif } static inline int Index: src/sys/arch/xen/include/i386/hypercalls.h diff -u src/sys/arch/xen/include/i386/hypercalls.h:1.18 src/sys/arch/xen/include/i386/hypercalls.h:1.19 --- src/sys/arch/xen/include/i386/hypercalls.h:1.18 Sat Feb 2 12:32:55 2019 +++ src/sys/arch/xen/include/i386/hypercalls.h Sun Feb 10 11:10:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hypercalls.h,v 1.18 2019/02/02 12:32:55 cherry Exp $ */ +/* $NetBSD: hypercalls.h,v 1.19 2019/02/10 11:10:34 cherry Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -368,9 +368,21 @@ HYPERVISOR_shutdown(void) long ret; unsigned long ign1, ign2; +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + +struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_poweroff +}; + _hypercall(__HYPERVISOR_sched_op, - _harg("1" (SCHEDOP_shutdown), "2" (SHUTDOWN_poweroff)), + _harg("1" (SCHEDOP_shutdown), "2" (_reason)), _harg("=a" (ret), "=b" (ign1), "=c" (ign2))); +#else + _hypercall(__HYPERVISOR_sched_op, + _harg("1" (SCHEDOP_shutdown), "2" (SHUTDOWN_poweroff)), + _harg("=a" (ret), "=b" (ign1), "=c" (ign2))); + +#endif return ret; } @@ -381,9 +393,20 @@ HYPERVISOR_crash(void) long ret; unsigned long ign1, ign2; +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + +struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_crash +}; + +_hypercall(__HYPERVISOR_sched_op, + _harg("1" (SCHEDOP_shutdown), "2" (_reason)), + _harg("=a" (ret), "=b" (ign1), "=c" (ign2))); +#else _hypercall(__HYPERVISOR_sched_op, _harg("1" (SCHEDOP_shutdown), "2" (SHUTDOWN_crash)), _harg("=a" (ret), "=b" (ign1), "=c" (ign2))); +#endif return ret; } @@ -394,9 +417,20 @@ HYPERVISOR_reboot(void) long ret; unsigned long ign1, ign2; +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 + +struct sched_shutdown shutdown_reason = { + .reason = SHUTDOWN_reboot +}; + +_hypercall(__HYPERVISOR_sched_op, + _harg("1" (SCHEDOP_shutdown), "2" (_reason)), + _harg("=a" (ret), "=b" (ign1), "=c" (ign2))); +#else _hypercall(__HYPERVISOR_sched_op, _harg("1" (SCHEDOP_shutdown), "2" (SHUTDOWN_reboot)), _harg("=a"
CVS commit: src/sbin/gpt
Module Name:src Committed By: martin Date: Sun Feb 10 10:35:51 UTC 2019 Modified Files: src/sbin/gpt: migrate.c Log Message: Make "gpt migrate" work for disks with FAT32 and NTFS partitions To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sbin/gpt/migrate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/migrate.c diff -u src/sbin/gpt/migrate.c:1.33 src/sbin/gpt/migrate.c:1.34 --- src/sbin/gpt/migrate.c:1.33 Tue Jul 3 03:41:24 2018 +++ src/sbin/gpt/migrate.c Sun Feb 10 10:35:51 2019 @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: migrate.c,v 1.33 2018/07/03 03:41:24 jnemeth Exp $"); +__RCSID("$NetBSD: migrate.c,v 1.34 2019/02/10 10:35:51 martin Exp $"); #endif #include @@ -289,6 +289,16 @@ migrate(gpt_t gpt, u_int parts, int forc type = GPT_TYPE_EFI; break; + case MBR_PTYPE_NTFS: + case MBR_PTYPE_FAT12: + case MBR_PTYPE_FAT16S: + case MBR_PTYPE_FAT16B: + case MBR_PTYPE_FAT32: + case MBR_PTYPE_FAT32L: + case MBR_PTYPE_FAT16L: + type = GPT_TYPE_MS_BASIC_DATA; + break; + default: if (!force) { gpt_warnx(gpt, "unknown partition type (%d)",
CVS commit: src/tests/lib/libc/arch/m68k
Module Name:src Committed By: mlelstv Date: Sun Feb 10 09:54:39 UTC 2019 Modified Files: src/tests/lib/libc/arch/m68k: return_one.S Log Message: provide a test function, avoids crashing tests with SIGSEGV. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/arch/m68k/return_one.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/arch/m68k/return_one.S diff -u src/tests/lib/libc/arch/m68k/return_one.S:1.1 src/tests/lib/libc/arch/m68k/return_one.S:1.2 --- src/tests/lib/libc/arch/m68k/return_one.S:1.1 Mon Jul 18 23:16:09 2011 +++ src/tests/lib/libc/arch/m68k/return_one.S Sun Feb 10 09:54:39 2019 @@ -1,8 +1,9 @@ -/* $NetBSD: return_one.S,v 1.1 2011/07/18 23:16:09 jym Exp $ */ +/* $NetBSD: return_one.S,v 1.2 2019/02/10 09:54:39 mlelstv Exp $ */ #include -.globl return_one, return_one_end; - -return_one: return_one_end: - nop +_ENTRY(return_one) + moveq #1,%d0 + rts + .globl return_one_end +return_one_end:
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: skrll Date: Sun Feb 10 08:39:48 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm2835_intr.c Log Message: Add some more interrupt source names To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/broadcom/bcm2835_intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm2835_intr.c diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.16 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.17 --- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.16 Thu Jan 3 10:26:41 2019 +++ src/sys/arch/arm/broadcom/bcm2835_intr.c Sun Feb 10 08:39:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_intr.c,v 1.16 2019/01/03 10:26:41 skrll Exp $ */ +/* $NetBSD: bcm2835_intr.c,v 1.17 2019/02/10 08:39:48 skrll Exp $ */ /*- * Copyright (c) 2012, 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.16 2019/01/03 10:26:41 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.17 2019/02/10 08:39:48 skrll Exp $"); #define _INTR_PRIVATE @@ -192,6 +192,7 @@ static const char * const bcm2835_source static const char * const bcm2836mp_sources[BCM2836_NIRQPERCPU] = { "cntpsirq", "cntpnsirq", "cnthpirq", "cntvirq", "mailbox0", "mailbox1", "mailbox2", "mailbox3", + "gpu", "pmu" }; #define BCM2836_INTBIT_GPUPENDING __BIT(8)