gcc tickets for sparse attributes
Hi,
I have filed gcc tickets asking for direct support in gcc for some sparse extensions that we use heavily in the kernel:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59851
However, I would also like support for the context extensions, but I'm not knowledgeable enough to describe the semantics accurately. Would anyone be willing to file a ticket describing how the context extension works well enough that it could be implemented?
-hpa
Quoted 8 lines · H. Peter Anvin
Hi,
I have filed gcc tickets asking for direct support in gcc for some sparse extensions that we use heavily in the kernel:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59851
Add:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59852
-hpa
Quoted 4 lines · H. Peter Anvin
However, I would also like support for the context extensions, but I'm not knowledgeable enough to describe the semantics accurately. Would anyone be willing to file a ticket describing how the context extension works well enough that it could be implemented?
IMHO the context extension doesn't work well enough in sparse to document and implement as is. It would be much better if it actually was able to differentiate between contexts, rather than treating each one the same. This would avoid the problem that locking one lock and unlocking another (in the kernel's __acquire/ __release mechanism) could still result in a warning.
johannes
Quoted 10 lines · H. Peter Anvin
I have filed gcc tickets asking for direct support in gcc for some sparse extensions that we use heavily in the kernel:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59851However, I would also like support for the context extensions, but I'm not knowledgeable enough to describe the semantics accurately. Would anyone be willing to file a ticket describing how the context extension works well enough that it could be implemented?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59856
Also:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59855
- Josh Triplett
Quoted 11 lines · Johannes Berg
Quoted 4 lines · H. Peter Anvin
However, I would also like support for the context extensions, but I'm not knowledgeable enough to describe the semantics accurately. Would anyone be willing to file a ticket describing how the context extension works well enough that it could be implemented?
IMHO the context extension doesn't work well enough in sparse to document and implement as is. It would be much better if it actually was able to differentiate between contexts, rather than treating each one the same.
That would certainly be nice, but that's something actually much more easily done in GCC than in Sparse, given the types of information GCC already has available to implement features like alias analysis.
In any case, the spec I wrote up assumes a distinction between contexts, but allows for an initial implementation like Sparse's that ignores the distinction.
Quoted 3 lines
This would avoid the problem that locking one lock and unlocking another (in the kernel's __acquire/
__releasemechanism) could still result in a warning.
That would actually *not* produce a warning, though it should. In general, I *think* an implementation like Sparse's that ignores the distinction between locks should produce false negatives but not false positives.
- Josh Triplett
Quoted 9 lines
Quoted 5 lines
IMHO the context extension doesn't work well enough in sparse to document and implement as is. It would be much better if it actually was able to differentiate between contexts, rather than treating each one the same.
That would certainly be nice, but that's something actually much more easily done in GCC than in Sparse, given the types of information GCC already has available to implement features like alias analysis.
Right.
Quoted 3 lines
In any case, the spec I wrote up assumes a distinction between contexts, but allows for an initial implementation like Sparse's that ignores the distinction.
Ok cool. :)
Quoted 8 lines
Quoted 3 lines
This would avoid the problem that locking one lock and unlocking another (in the kernel's __acquire/
__releasemechanism) could still result in a warning.That would actually *not* produce a warning, though it should. In general, I *think* an implementation like Sparse's that ignores the distinction between locks should produce false negatives but not false positives.
Right, it doesn't report one now.
johannes