> From: Todd C. Miller <mill...@openbsd.org>
> Date: Tue, 25 Mar 2025 08:54:08 -0600
> 
> On Tue, 25 Mar 2025 15:11:09 +0100, Martin Pieuchot wrote:
> 
> > David Higgs recently reported an incorrect usage of uvm_map_protect(9):
> >   https://marc.info/?l=openbsd-tech&m=174001772620750&w=2
> >
> > It turns out there's another one in exec_sigcode_map(), fixed by the
> > diff below.  Currently the uvm_map_protect(9) calls has no effect and
> > returns EINVAL.
> 
> I'm not 100% sure that change is correct.  Shouldn't it be:
> 
>       error = (uvm_map_protect(&p->p_vmspace->vm_map, cmd->ev_addr,
>           trunc_page(cmd->ev_addr) + round_page(cmd->ev_len),
>           prot, 0, FALSE, TRUE));
> 
> to match uvm_mmap()?

That doesn't make sense to me.  Where is that idiom used?

Reply via email to