Skip to content
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

fix: update cwd_read to assign vfsmnt correctly #3261

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arthur-zhang
Copy link
Contributor

Fixes

Description

cwd_read do not assign data->vfsmnt correctly. in container env, the cwd_read will obtain all the file path to root like when read /tmp/tetragon. it will make arg match failed

/scon/containers/01J6HEV7R29R4WXXS1N2CS9ATP/rootfs/tmp/tetragon

in the old code, mnt is pointer to the old data->mnt, which is not correct.

struct mount *mnt = data->mnt;
...
if (data->mnt != parent) {
    probe_read(&data->dentry, sizeof(data->dentry),
			    _(&mnt->mnt_mountpoint));
    data->mnt = parent;
    probe_read(&data->vfsmnt, sizeof(data->vfsmnt),
			    _(&mnt->mnt));
    return 0;
}

Changelog

todo!

@arthur-zhang arthur-zhang requested a review from a team as a code owner December 27, 2024 04:01
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.

1 participant