On 05/11/19(Tue) 10:35, Mark Kettenis wrote:
> > Date: Tue, 5 Nov 2019 10:07:36 +0100
> > From: Martin Pieuchot <m...@openbsd.org>
> > 
> > Diff below reintroduce the `kv_executable' flag for km_alloc(9) with a
> > different meaning.  Instead of mapping the pages RWX, the flags allows
> > the caller to change the protection of the mapping to include PROT_EXEC.
> > 
> > This allows sti(4) to be converted to km_alloc(9), without introducing
> > side-effect on the actual consumers of the API and without allows RWX
> > mappings by default.
> > 
> > ok?
> 
> Hi Martin,
> 
> Apologies for not reacting to your previous mail.

No worries, thanks for answering :)

> I must say I don't really like this.  This would convey the message
> that it is ok to allocate executable memory.  Are there other cases in
> the tree besides sti(4) that would use this?

By looking at the uses of uvm_map_protect(9), I'd say sti(4) is an
exception.

> If not, then maybe the solution is just to hand-roll a solution.  I
> need to refresh my meory on sti(4) though to see what's really going
> on here again.

Fine with me, I drop my diff then.

Reply via email to