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

Fixes for Xenstore permission related issues #81

Merged
merged 3 commits into from
May 9, 2024

Conversation

firscity
Copy link
Collaborator

@firscity firscity commented May 6, 2024

Some problems were found when we tried to start 2 Linux domains connected with PV drivers. Xenstore configurations sometimes came into incorrect state and produce permissions errors. Patches in this PR fixes these problems.

@Deedone
Copy link
Contributor

Deedone commented May 7, 2024

LGTM
Reviewed-by: Mykyta Poturai <[email protected]>

@GrygiriiS
Copy link

Reviewed-by: Grygorii Strashko <[email protected]>

Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

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

Acked-by: Volodymyr Babchuk <[email protected]>

Copy link
Contributor

@LKomaryanskiy LKomaryanskiy left a comment

Choose a reason for hiding this comment

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

Good job!
Reviewed-by: Leonid Komarianskyi <[email protected]>

firscity added 3 commits May 9, 2024 12:53
Strange issues related to Xenstore nodes permissions appeared during
usage of xenstore-srv with 2 Linux domains with PV drivers
configurations: some of the requests received -EACCES for nodes, that
are located in domain "/local/domain/{domid}" directory.

It was caused by incorrect node iterating process during path parsing.
parent_entry for current node were correct only if it was last in
previous directory (in other case it took last value from previous
Xenstore level).

Fix parent_entry processing and remember whole node during iteration
instead of just list of child nodes.

Signed-off-by: Dmytro Firsov <[email protected]>
Reviewed-by: Mykyta Poturai <[email protected]>
Reviewed-by: Grygorii Strashko <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
Reviewed-by: Leonid Komarianskyi <[email protected]>
During Xenstore entries initialization we should create
"local/domain/{domid}" directory and give {domid} domain read/write
access to child entries. When it is missing, local directory will
have access provided from first xss_do_write() for this domain, which
may lead to unexpected access issues.

Signed-off-by: Dmytro Firsov <[email protected]>
Reviewed-by: Mykyta Poturai <[email protected]>
Reviewed-by: Grygorii Strashko <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
Reviewed-by: Leonid Komarianskyi <[email protected]>
Error logs used non-const variable "path" which is modified by strtok()
and divided into parts. Such messages are not helpful, because it
prints only first level of path.
Use const_path variable with full node path for error messages.

Signed-off-by: Dmytro Firsov <[email protected]>
Reviewed-by: Mykyta Poturai <[email protected]>
Reviewed-by: Grygorii Strashko <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
Reviewed-by: Leonid Komarianskyi <[email protected]>
@firscity firscity force-pushed the xs-access-fixes branch from 7d82b8d to a270391 Compare May 9, 2024 09:55
@firscity firscity merged commit 34bf446 into xen-troops:main May 9, 2024
5 checks passed
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.

5 participants