]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r315518
authoralc <alc@FreeBSD.org>
Wed, 28 Jun 2017 05:28:15 +0000 (05:28 +0000)
committeralc <alc@FreeBSD.org>
Wed, 28 Jun 2017 05:28:15 +0000 (05:28 +0000)
commitecb5a7e5f9dcad755b6f7a80001364bf3741b617
treee84d9d4254cb3160014bd223dfe7be456aa877cc
parenteb68a05ac0b7244bce89dd423945345403220149
MFC r315518
  Avoid unnecessary calls to vm_map_protect() in elf_load_section().

  Typically, when elf_load_section() unconditionally passed VM_PROT_ALL to
  elf_map_insert(), it was needlessly enabling execute access on the
  mapping, and it would later have to call vm_map_protect() to correct the
  mapping's access rights.  Now, instead, elf_load_section() always passes
  its parameter "prot" to elf_map_insert().  So, elf_load_section() must
  only call vm_map_protect() if it needs to remove the write access that
  was temporarily granted to perform a copyout().

Approved by: re (kib)
sys/kern/imgact_elf.c