lindebugfs allocates an intermediate kernel buffer that is passed to
the read callback rather than passing a user pointer.
Obtained from: CheriBSD
Sponsored by: DARPA
Differential D38420
lindebugfs: Update fops_blob_read to operate on a kernel pointer. jhb on Feb 7 2023, 6:02 PM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions This is what I used locally in CheriBSD for now and might be an alternative to D37101. Comment Actions EAFNOTSUP; sorry, I'll try to give it a try within 48 hours. @jfree can you do drm testing? Comment Actions A quick grep -r "debugfs_create_blob" drm yields only two results: amd/amdgpu/amdgpu_debugfs.c: debugfs_create_blob("amdgpu_vbios", 0444, root, amd/amdgpu/amdgpu_debugfs.c: debugfs_create_blob("amdgpu_discovery", 0444, root, Unfortunately, I do not have access to AMD hardware, so I cannot test this. It doesn't look like the debugfs blob interface is used very much in drm. Comment Actions Is this a similar problem to 5668c22a13c6befa9b8486387d38457c40ce7af4 ? Is this still a problem? Comment Actions Looks kind of similar. I have it as a downstream diff in CheriBSD as otherwise it don't compile at all. (CheriBSD doesn't let you mix and match user vs kernel pointers willy-nilly as they are different types.) I guess I'll have to deal with the merge conflict when merging your other change. Comment Actions I'll go and test/review it on iwlwifi once the update is through. mvm/debugfs is using it too these days. Comment Actions FYI, when merging the commit you mentioned to CheriBSD, I ended up dropping this change since simple_read_from_buffer() now assumes a kernel pointer. |