On Wed, Feb 02, 2022 at 04:19:10PM -0800, Philip Guenther wrote:
> On Wed, 2 Feb 2022, Alexander Bluhm wrote:
> > On Wed, Feb 02, 2022 at 07:53:59PM +0000, Miod Vallat wrote: > > Hi, > > > 
> > > On my sparc64 machine
> > regress/lib/libpthread triggers a panic. It > > happend with Feb 1 and Jan 
> > 31 snapshot. Jan 29 snapshot paniced >
> > 
> > 
> > On Wed, Feb 02, 2022 at 07:53:59PM +0000, Miod Vallat wrote:
> > > > Hi,
> > > > 
> > > > On my sparc64 machine regress/lib/libpthread triggers a panic.  It
> > > > happend with Feb 1 and Jan 31 snapshot.  Jan 29 snapshot paniced
> > > > somewhere else.  Test and console output below.
> > > > 
> > > > *cpu1: pmap_enter: access_type exceeds prot
> > > > 
> > > > bluhm
> > > 
> > > Does the following diff help?
> > 
> > Unfortunately not.  Same panic.
> 
> That suggests this is probably from the __HAVE_PMAP_MPSAFE_ENTER_COW 
> change.  Can you try this diff, mirroring miod's?
> 
> (Perhaps sparc64 has correct break-before-make semantics, I'm not wise 
> enough in sparc64 pmap to know)

Yes, that works.  Now the libpthread test passes.  Thanks for fixing.

===> dlopen
==== run-regress-dlopen ====
cc -O2 -pipe  -Wall  -DSRCDIR='"/usr/src/regress/lib/libpthread/dlopen"' -I/usr/
src/regress/lib/libpthread/dlopen/../include  -MD -MP  -c /usr/src/regress/lib/l
ibpthread/dlopen/dlopen.c
cc   -o dlopen dlopen.o 
./dlopen
* * * * * * * * * * * * * * * * * * * * * * * * * * * single threaded
semop: pass                             time = 1.004932987
sigsuspend: pass                        time = 1.009449734
poll: pass                              time = 1.009899718
open_fifo: pass                 time = 1.006831972
nanosleep: pass                 time = 1.009408379
flock: pass                             time = 1.004746016
fcntl(F_SETLKW): pass                   time = 1.000472514
connect: pass                           time = 1.006193209
accept: pass                            time = 1.009780902
in thread after dlopen(pthread)
semop: pass                             time = 1.001046404
sigsuspend: pass                        time = 1.009937496
poll: pass                              time = 1.010037019
open_fifo: pass                 time = 1.008657537
nanosleep: pass                 time = 1.009459707
flock: pass                             time = 1.004261450
fcntl(F_SETLKW): pass                   time = 1.000294792
connect: pass                           time = 1.005851200
accept: pass                            time = 1.009922207
using cancellation
semop: pass                             time = 1.009259479
sigsuspend: pass                        time = 1.009558880
poll: pass                              time = 1.009735009
open_fifo: pass                 time = 1.008635075
nanosleep: pass                 time = 1.009519861
flock: pass                             time = 1.003595113
fcntl(F_SETLKW): pass                   time = 1.007637156
connect: pass                           time = 1.005525961
accept: pass                            time = 1.009673682

> Index: uvm/uvm_fault.c
> ===================================================================
> RCS file: /data/src/openbsd/src/sys/uvm/uvm_fault.c,v
> retrieving revision 1.125
> diff -u -p -r1.125 uvm_fault.c
> --- uvm/uvm_fault.c   1 Feb 2022 08:38:53 -0000       1.125
> +++ uvm/uvm_fault.c   3 Feb 2022 00:16:26 -0000
> @@ -1022,8 +1022,10 @@ uvm_fault_upper(struct uvm_faultinfo *uf
>                * uvm does it by inserting the new mapping RO and
>                * letting it fault again.
>                */
> -             if (P_HASSIBLING(curproc))
> +             if (P_HASSIBLING(curproc)) {
>                       flt->enter_prot &= ~PROT_WRITE;
> +                     flt->access_type &= ~PROT_WRITE;
> +             }
>  #endif
>  
>               /*
> 

Reply via email to