Skip to content

Improve path readability check#176

Closed
sjoerdsimons wants to merge 1 commit intoROCm:amd-mainlinefrom
sjoerdsimons:improve-readability-test
Closed

Improve path readability check#176
sjoerdsimons wants to merge 1 commit intoROCm:amd-mainlinefrom
sjoerdsimons:improve-readability-test

Conversation

@sjoerdsimons
Copy link

On modern system e.g. render nodes are made accessible via the udev uaccess functionality, which adds the logged in user to the ACL of the device. This means just checking for user and group is bound to give false positives. Instead simply try to open the device as a test and only if that fails try to determine the cause based on user/groups

Motivation

Avoid false positives in readability tets

Technical Details

On modern system e.g. render nodes are made accessible via the udev uaccess functionality, which adds the logged in user to the ACL of the device. This means just checking for user and group is bound to give false positives. Instead simply try to open the device as a test and only if that fails try to determine the cause based on user/groups

Test Plan

Tested on framework desktop with devices managed by uaccess

Test Result

Permission denied warnings without this change; No warnings without

Submission Checklist

  • [ x ] Look over the contributing guidelines at ha

Copilot AI review requested due to automatic review settings January 29, 2026 15:50
@sjoerdsimons sjoerdsimons force-pushed the improve-readability-test branch 2 times, most recently from 883ba29 to 8d0aa28 Compare January 29, 2026 15:51
@sjoerdsimons sjoerdsimons changed the title Check device node readabl Improve path readability check Jan 29, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to fix false positives in device readability checks on modern systems that use udev uaccess functionality with ACLs. Instead of only checking traditional Unix user/group permissions, the code now attempts to open the device file to test actual access.

Changes:

  • Added ACL-aware access check by attempting to open the device file before falling back to traditional permission checks
  • Removed trailing whitespace from line 1306

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

On modern system e.g. render nodes are made accessible via the udev
uaccess functionality, which adds the logged in user to the ACL of the
device. This means just checking for user and group is bound to give
false positives. Instead use os.access as a first check

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sjoerdsimons sjoerdsimons force-pushed the improve-readability-test branch from 8acceea to 562ad24 Compare January 29, 2026 16:06
@superm1
Copy link
Contributor

superm1 commented Jan 29, 2026

This is actually the wrong repo because ROCm has switched to mono-repo. Could you re-open it here:

https://github.com/ROCm/rocm-systems/tree/develop/projects/amdsmi

@sjoerdsimons
Copy link
Author

This is actually the wrong repo because ROCm has switched to mono-repo. Could you re-open it here:

https://github.com/ROCm/rocm-systems/tree/develop/projects/amdsmi

Will do! would be great if there was a note in this repo to make that more discoverable for people ;)

@superm1
Copy link
Contributor

superm1 commented Jan 29, 2026

It's really confusing but there are still releases from the "legacy" train coming here. Basically pure cherry picks for the legacy branch.
@marifamd could we update README.md to explain the move though?

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.

2 participants