casaroli commented on code in PR #19673: URL: https://github.com/apache/nuttx/pull/19673#discussion_r3792851624
########## libs/libc/elf/elf.h: ########## @@ -356,4 +356,24 @@ int libelf_addrenv_restore(FAR struct mod_loadinfo_s *loadinfo); void libelf_addrenv_free(FAR struct mod_loadinfo_s *loadinfo); #endif /* CONFIG_ARCH_ADDRENV */ + +#ifdef HAVE_LIBC_ELF_PIN +/**************************************************************************** + * Name: libelf_pinrelease + * + * Description: + * Give back an XIP pin taken while loading, and the file it was held + * through. Does nothing if no pin was taken. + * + * Input Parameters: + * pinfile - The held file, cleared on return. + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void libelf_pinrelease(FAR struct file **pinfile); Review Comment: in `CONFIG_BUILD_KERNEL`, there is `g_kmm_map` for `vmalloc()`. Should we make a similar one for binfmt so that we can `mmap` an ELF or FDPIC ELF module with the kernel being the owner? Or maybe even add `mm_map_lock_mm()` / `file_munmap_mm()` capability? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
