Hi, It seems that r1.124 of uvm_amap.c causes random userland segfaults on my NetBSD/amd64.
If you cannot reproduce the random segfaults, I will send my backtraces. "Chuck Silvers" <c...@netbsd.org> writes: > Module Name: src > Committed By: chs > Date: Sun Sep 20 23:03:01 UTC 2020 > > Modified Files: > src/sys/uvm: uvm_amap.c > > Log Message: > Effectively disable the AMAP_REFALL flag because it is unsafe. > This flag tells the amap code that it does not need to allocate ppref > as part of adding or removing a reference, but that is only correct > if the range of the reference being added or removed is the same > as the range of all other references to the amap, and the point of > this flag is exactly to try to optimize the case where the range is > different and thus this flag would not be correct to use. > Fixes PR 55366. > > > To generate a diff of this commit: > cvs rdiff -u -r1.123 -r1.124 src/sys/uvm/uvm_amap.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/uvm/uvm_amap.c > diff -u src/sys/uvm/uvm_amap.c:1.123 src/sys/uvm/uvm_amap.c:1.124 > --- src/sys/uvm/uvm_amap.c:1.123 Tue Aug 18 10:40:20 2020 > +++ src/sys/uvm/uvm_amap.c Sun Sep 20 23:03:01 2020 > @@ -1,4 +1,4 @@ > -/* $NetBSD: uvm_amap.c,v 1.123 2020/08/18 10:40:20 chs Exp $ */ > +/* $NetBSD: uvm_amap.c,v 1.124 2020/09/20 23:03:01 chs Exp $ */ > > /* > * Copyright (c) 1997 Charles D. Cranor and Washington University. > @@ -35,7 +35,7 @@ > */ > > #include <sys/cdefs.h> > -__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.123 2020/08/18 10:40:20 chs Exp > $"); > +__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.124 2020/09/20 23:03:01 chs Exp > $"); > > #include "opt_uvmhist.h" > > @@ -1593,7 +1593,7 @@ amap_adjref_anons(struct vm_amap *amap, > * so that the ppref values match the current amap refcount. > */ > > - if (amap->am_ppref == NULL && !all && len != amap->am_nslot) { > + if (amap->am_ppref == NULL) { > amap_pp_establish(amap, offset); > } > #endif > -- Ryo ONODERA // r...@tetera.org PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3