While this is harmless, these pointers are not useful to any user
code. Let's stop copying and documenting them.
Details
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 32214 Build 29710: arc lint + arc unit
Event Timeline
I do not object but also there is no much sense in this change. Both because we do not randomize KVA and because we export KVA layouts in many ways, some of which you added.
I understand, it is more about the intent: we have interfaces that export kernel pointers for debugging purposes, but here it is done because the same structure is used by both userland and the kernel, i.e., the interface is poorly designed. In that case I think it is reasonable to patch the leak, if only to avoid seeing the same reports again and again.
In that case I think it is reasonable to patch the leak, if only to avoid seeing the same reports again and again.
Agreed.
Then perhaps add a comment at the place that nullifies the pointers explaining why.
BTW, a serious places that export kptrs do that not for debugging. The cases that I can remember immediately are kinfo_proc with pointers to struct proc/thread and wait channels.
Even there, it is not an accident. ps even has "-o paddr" for displaying such pointers. I've used it in the past to debug ptrace issues.