> Date: Sun, 30 Mar 2025 15:38:21 +0200
> From: Martin Pieuchot <m...@grenadille.net>
> 
> On 28/03/25(Fri) 19:53, Miod Vallat wrote:
> > > If this code has never been tested on pmap_kernel() then it is dead code
> > > and I'd rather remove it.  Whoever wants to reduce the permission of the
> > > mapping will have to check on all architectures that this is supported.
> > 
> > Well it is obvious that, because of the incorrect end address argument,
> > this call to uvm_map_protect() has never done anything, but it would be
> > nice to have the fixed call anyway.
> 
> I agree.  I'm just not going to do it myself.  This is a new feature.
> 
> > How about keeping it within
> > 
> > /* pmap_write_protect() needs fixing to cope with pmap_kernel() on x86*/
> > #if !defined(__amd64__) && !defined(__i386__)
> >     the uvm_map_protect() call
> > #endif
> > 
> > so that other platforms, where quick inspection of their pmap code shows
> > they ought to behave correctly, can benefit from the sigcode page being
> > made read-only?
> 
> I'm happy to hear that.  We all agree they can benefit from such change.
> That said, I'm not going to test pmap features across our architectures.
> 
> Can I have an ok for my diff?  Or should I drop it?

I'd leave the code as-is for now.

I noticed your diff was removing uao_reference() calls.  What is the
reason for doing that?

Reply via email to