> 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.

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?

Reply via email to