Skip to content

configure: allow shmem mount path to be a symlinked directory #5680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

anwayde
Copy link
Contributor

@anwayde anwayde commented Jul 16, 2025

No description provided.

@@ -338,9 +332,16 @@ check( config_t const * config ) {
PARTIALLY_CONFIGURED( "mount `%s` is on unrecognized device, expected `none`", mount_path[ i ] );
}

/* Resolve symlinks for mount_path as the mounts table has the resolved paths */
char resolved_mount_path[ PATH_MAX ];
if( FD_UNLIKELY( !realpath( mount_path[ i ], resolved_mount_path ) ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use real syscall, e.g. readlink here instead of libc which might do other kinds of garbage underneath us. Also, failure to resolve is an FD_LOG_ERR, not a PARTIALLY_CONFIGURED (which is going to cause us to try blow away the directory).

@topointon-jump
Copy link
Contributor

Let's hold off on this for now

@ripatel-fd
Copy link
Contributor

A hack for a hack ... Or we just allow a user to specify a custom funk backing file?

@anwayde
Copy link
Contributor Author

anwayde commented Jul 22, 2025

Seems like we don't need/want the ability to specify symlinks for mount paths. Closing for now.

@anwayde anwayde closed this Jul 22, 2025
@ripatel-fd
Copy link
Contributor

ripatel-fd commented Jul 22, 2025

Thanks for sending this PR, it makes sense given what we already have on main. The underlying issue is the normalpages configure stage, which is a broken design (requiring different mount paths to map a single file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants