Date: Tue, 22 Oct 2019 16:28:45 +0800 From: Li-Wen Hsu <lwhsu@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r353876 - head/sys/kern Message-ID: <CAKBkRUzTs%2BSpUr0AFoj%2Bmt2im_0TDDc5bq-E0N5SwAV%2BV7BpEQ@mail.gmail.com> In-Reply-To: <201910212312.x9LNCEbX052414@repo.freebsd.org> References: <201910212312.x9LNCEbX052414@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 22, 2019 at 7:12 AM Gleb Smirnoff <glebius@freebsd.org> wrote: > > Author: glebius > Date: Mon Oct 21 23:12:14 2019 > New Revision: 353876 > URL: https://svnweb.freebsd.org/changeset/base/353876 > > Log: > Assert that any epoch tracker belongs to the thread stack. > > Reviewed by: kib > > Modified: > head/sys/kern/subr_epoch.c > > Modified: head/sys/kern/subr_epoch.c > ============================================================================== > --- head/sys/kern/subr_epoch.c Mon Oct 21 21:21:34 2019 (r353875) > +++ head/sys/kern/subr_epoch.c Mon Oct 21 23:12:14 2019 (r353876) > @@ -366,9 +366,13 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et > struct thread *td; > > MPASS(cold || epoch != NULL); > - INIT_CHECK(epoch); > MPASS(epoch->e_flags & EPOCH_PREEMPT); > td = curthread; > + MPASS((vm_offset_t)et >= td->td_kstack && > + (vm_offset_t)et + sizeof(struct epoch_tracker) < > + td->td_kstack + td->td_kstack_pages * PAGE_SIZE); > + > + INIT_CHECK(epoch); > #ifdef EPOCH_TRACE > epoch_trace_enter(td, epoch, et, file, line); > #endif Hello Gleb, RISC-V boot panics with this message: panic: Assertion (vm_offset_t)et >= td->td_kstack && (vm_offset_t)et + sizeof(struct epoch_tracker) < td->td_kstack + td->td_kstack_pages * PAGE_SIZE failed at /workspace/src/sys/kern/subr_epoch.c:373 Full log: https://ci.freebsd.org/job/FreeBSD-head-riscv64-test/12334/console Can you help check this? Thanks, Li-Wen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKBkRUzTs%2BSpUr0AFoj%2Bmt2im_0TDDc5bq-E0N5SwAV%2BV7BpEQ>