Philipp Dunkel
ee36353428
vfs: load native addons from a mounted file system
...
A native addon inside a virtual file system could not be require()d:
dlopen() and LoadLibrary() open a shared object by path, and a VFS path
has no inode for them to open.
Read the addon's bytes from the VFS and load them from a private,
self-cleaning image instead, using the smallest on-disk footprint each
platform allows: on Linux an anonymous memfd loaded through
/proc/self/fd, so the bytes never reach the file system; on other POSIX
platforms a file in a 0700 mkdtemp() directory, unlinked right after
loading, with the mapping keeping it alive; on Windows a temp file
opened FILE_FLAG_DELETE_ON_CLOSE whose handle is held until exit.
This is internal. process.dlopen() keeps its documented
(module, filename[, flags]) signature and ignores anything further; the
bytes are passed to a dlopenBinary() reachable only through the
process_methods binding, which the VFS hook calls for VFS paths. Addons
on the real file system are untouched and load directly.
Signed-off-by: Philipp Dunkel <pip@pipobscure.com >
PR-URL: https://github.com/nodejs/node/pull/65680
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-09-04 16:48:33 +00:00
..
2026-09-03 23:54:01 +00:00
2026-08-28 17:42:10 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:21 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:21 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:21 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:21 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:22 +00:00
2026-09-03 15:37:21 +00:00
2026-08-28 13:31:48 +00:00
2026-09-03 12:57:27 +00:00
2026-09-04 13:28:27 +00:00
2026-09-03 05:35:54 +00:00
2026-08-31 14:48:19 +00:00
2026-09-02 08:50:34 +00:00
2026-08-28 09:26:21 +00:00
2026-08-28 09:26:35 +00:00
2026-09-04 10:36:50 +00:00
2026-09-02 08:50:36 +00:00
2026-09-02 08:50:36 +00:00
2026-08-29 00:58:18 +02:00
2026-08-29 00:58:18 +02:00
2026-08-29 00:58:18 +02:00
2026-08-29 00:58:18 +02:00
2026-08-29 00:58:18 +02:00
2026-08-29 00:58:18 +02:00
2026-08-29 09:19:12 +02:00
2026-09-02 08:50:34 +00:00
2026-09-02 16:43:10 +00:00
2026-09-04 16:48:33 +00:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-03 11:40:52 +02:00
2026-09-04 04:45:19 +00:00
2026-08-28 17:42:10 +00:00
2026-08-29 13:28:47 +00:00
2026-08-31 05:37:01 +00:00
2026-08-31 17:03:33 +08:00
2026-08-31 17:03:33 +08:00
2026-08-31 10:19:57 -03:00
2026-09-03 05:36:15 +00:00
2026-09-03 15:28:39 +00:00
2026-09-03 15:28:39 +00:00
2026-09-03 15:28:39 +00:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-09-02 16:17:15 -04:00
2026-08-28 17:42:22 +00:00
2026-08-31 17:48:30 +02:00
2026-09-03 08:43:14 +00:00
2026-08-31 13:07:39 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 08:43:14 +00:00
2026-09-03 15:28:39 +00:00
2026-09-03 09:30:21 +00:00
2026-08-28 10:46:20 -07:00
2026-08-28 10:46:20 -07:00
2026-08-28 10:46:20 -07:00
2026-08-31 17:25:06 +00:00
2026-09-02 03:55:41 +00:00
2026-08-29 09:54:40 +02:00
2026-09-03 15:37:21 +00:00
2026-08-28 09:26:21 +00:00
2026-09-03 15:37:21 +00:00
2026-09-02 14:59:15 +00:00
2026-09-02 14:59:15 +00:00
2026-09-02 14:59:15 +00:00
2026-09-04 16:48:33 +00:00
2026-08-28 00:23:11 +00:00
2026-09-02 05:48:32 +00:00
2026-08-31 14:59:47 +00:00
2026-09-02 08:50:34 +00:00
2026-08-28 00:23:11 +00:00
2026-09-02 10:00:05 +00:00
2026-09-02 10:00:05 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-27 18:30:25 +00:00
2026-08-28 00:23:11 +00:00
2026-08-28 09:26:21 +00:00
2026-08-28 09:26:21 +00:00
2026-08-28 09:26:21 +00:00
2026-09-03 23:54:01 +00:00
2026-09-02 23:33:37 +00:00
2026-09-03 15:36:30 +00:00
2026-08-31 15:47:32 +00:00
2026-09-02 13:14:36 +00:00
2026-09-02 13:14:36 +00:00
2026-09-02 13:14:35 +00:00
2026-09-02 13:14:35 +00:00
2026-09-02 13:14:29 +00:00
2026-09-02 13:14:30 +00:00
2026-09-02 13:14:35 +00:00
2026-09-02 13:14:34 +00:00
2026-09-02 13:14:32 +00:00
2026-09-02 13:14:31 +00:00
2026-08-28 10:46:20 -07:00
2026-08-31 18:04:06 +00:00
2026-09-03 15:28:39 +00:00
2026-09-02 03:55:31 +00:00
2026-08-27 21:15:40 +00:00
2026-09-02 05:48:32 +00:00
2026-09-04 16:48:33 +00:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-09-02 21:47:04 -07:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-09-02 21:47:04 -07:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-08-31 10:31:16 +02:00
2026-09-02 07:27:11 +00:00
2026-09-02 07:27:11 +00:00
2026-09-02 07:27:11 +00:00
2026-09-02 05:36:48 +00:00
2026-08-27 21:15:16 +00:00
2026-08-30 05:43:31 +00:00
2026-08-27 21:15:16 +00:00
2026-08-27 21:15:16 +00:00
2026-08-27 21:15:16 +00:00
2026-08-27 21:15:13 +00:00
2026-08-30 05:43:31 +00:00
2026-08-28 10:46:20 -07:00
2026-08-29 18:25:16 +00:00
2026-08-30 12:29:59 +00:00
2026-09-02 07:27:11 +00:00