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

/sys/debug/ fw_profile/ipc_type: permission denied #1171

Closed
marc-hb opened this issue Apr 9, 2024 · 4 comments
Closed

/sys/debug/ fw_profile/ipc_type: permission denied #1171

marc-hb opened this issue Apr 9, 2024 · 4 comments
Assignees
Labels
P2 Critical bugs or normal features type:bug Something doesn't work as expected

Comments

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 9, 2024

#1167 does not work: it's at least missing a few sudo. I think you didn't notice because you run sof-test as root but that's not how it's usually tested.

https://sof-ci.01.org/softestpr/PR1167/build265/devicetest/index.html?model=MTLP_RVP_NOCODEC&testcase=verify-kernel-module-load-probe

2024-04-05 14:58:59 UTC [REMOTE_INFO] Starting func_exit_handler(0)
cat: /sys/kernel/debug/sof/fw_profile/ipc_type: Permission denied
2024-04-05 14:58:59 UTC [REMOTE_WARNING] using pre kernel 6.9 backwards-compatible fallback with ipc_type kernel parameter
cat: /sys/kernel/debug/sof/fw_profile/ipc_type: Permission denied
2024-04-05 14:58:59 UTC [REMOTE_WARNING] using pre kernel 6.9 backwards-compatible fallback with ipc_type kernel parameter
2024-04-05 14:58:59 UTC [REMOTE_INFO] pkill -TERM -f mtrace-reader.py
2024-04-05 14:58:59 UTC [REMOTE_INFO] ktime=123 sof-test PID=3129: ending
2024-04-05 14:58:59 UTC [REMOTE_INFO] Test Result: PASS!

Originally posted by @marc-hb in #1167 (comment)

cc:

@marc-hb marc-hb added type:bug Something doesn't work as expected P2 Critical bugs or normal features labels Apr 9, 2024
@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 9, 2024

I think you didn't notice because you run sof-test as root but that's not how it's usually tested.

You can borrow any CI device to test and fix, no need to change the configuration of yours.

@plbossart
Copy link
Member

I am a bit confused here. The two files have the same permissions and use the same cat command.

root@jf-cml-hel-rt5682-05:~# ls -l /sys/kernel/debug/sof/fw_profile/ipc_type
-r--r--r-- 1 root root 0 Apr  9 16:35 /sys/kernel/debug/sof/fw_profile/ipc_type
root@jf-cml-hel-rt5682-05:~# ls -l /sys/module/snd_sof_pci/parameters/ipc_type 
-r--r--r-- 1 root root 4096 Apr  9 21:22 /sys/module/snd_sof_pci/parameters/ipc_type

What causes one to complain and not the other?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 9, 2024

/sys/kernel/debug is a different filesystem / mount point.

ls -ld /sys/kernel/debug
drwx------ 38 root root 0 Apr  8 18:06 /sys/kernel/debug

findmnt | grep debug
│ ├─/sys/kernel/debug                         debugfs                                          debugfs     rw,nosuid,nodev,noexec,relatime

@marc-hb marc-hb changed the title fw_profile/ipc_type: permission denied /sys/debug/ fw_profile/ipc_type: permission denied Apr 9, 2024
plbossart added a commit to plbossart/sof-test that referenced this issue Apr 9, 2024
Apparently debugfs requires more care. Oh well.

Link: thesofproject#1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
plbossart added a commit to plbossart/sof-test that referenced this issue Apr 9, 2024
Apparently debugfs requires more care. Oh well.

Link: thesofproject#1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
plbossart added a commit to plbossart/sof-test that referenced this issue Apr 10, 2024
Apparently debugfs requires more care. Oh well.

Link: thesofproject#1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
marc-hb pushed a commit that referenced this issue Apr 10, 2024
Apparently debugfs requires more care. Oh well.

Link: #1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Apr 15, 2024

This seems fixed, please re-open if seen again.

@marc-hb marc-hb closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Critical bugs or normal features type:bug Something doesn't work as expected
Projects
None yet
Development

No branches or pull requests

2 participants