All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc tickets for sparse attributes
@ 2014-01-17  5:27 H. Peter Anvin
  2014-01-17  5:35 ` H. Peter Anvin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: H. Peter Anvin @ 2014-01-17  5:27 UTC (permalink / raw)
  To: Linux-Sparse; +Cc: Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcc tickets for sparse attributes
  2014-01-17  5:27 gcc tickets for sparse attributes H. Peter Anvin
@ 2014-01-17  5:35 ` H. Peter Anvin
  2014-01-17  8:33 ` Johannes Berg
  2014-01-17  9:18 ` Josh Triplett
  2 siblings, 0 replies; 6+ messages in thread
From: H. Peter Anvin @ 2014-01-17  5:35 UTC (permalink / raw)
  To: Linux-Sparse; +Cc: Linux Kernel Mailing List

On 01/16/2014 09:27 PM, H. Peter Anvin wrote:
> 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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcc tickets for sparse attributes
  2014-01-17  5:27 gcc tickets for sparse attributes H. Peter Anvin
  2014-01-17  5:35 ` H. Peter Anvin
@ 2014-01-17  8:33 ` Johannes Berg
  2014-01-17  9:22   ` Josh Triplett
  2014-01-17  9:18 ` Josh Triplett
  2 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2014-01-17  8:33 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Linux-Sparse, Linux Kernel Mailing List

On Thu, 2014-01-16 at 21:27 -0800, H. Peter Anvin wrote:

> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcc tickets for sparse attributes
  2014-01-17  5:27 gcc tickets for sparse attributes H. Peter Anvin
  2014-01-17  5:35 ` H. Peter Anvin
  2014-01-17  8:33 ` Johannes Berg
@ 2014-01-17  9:18 ` Josh Triplett
  2 siblings, 0 replies; 6+ messages in thread
From: Josh Triplett @ 2014-01-17  9:18 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Linux-Sparse, Linux Kernel Mailing List

On Thu, Jan 16, 2014 at 09:27:08PM -0800, H. Peter Anvin wrote:
> 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?

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59856

Also:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59855

- Josh Triplett

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcc tickets for sparse attributes
  2014-01-17  8:33 ` Johannes Berg
@ 2014-01-17  9:22   ` Josh Triplett
  2014-01-17 10:23     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Triplett @ 2014-01-17  9:22 UTC (permalink / raw)
  To: Johannes Berg; +Cc: H. Peter Anvin, Linux-Sparse, Linux Kernel Mailing List

On Fri, Jan 17, 2014 at 09:33:16AM +0100, Johannes Berg wrote:
> On Thu, 2014-01-16 at 21:27 -0800, H. Peter Anvin wrote:
> 
> > 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.

> 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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcc tickets for sparse attributes
  2014-01-17  9:22   ` Josh Triplett
@ 2014-01-17 10:23     ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2014-01-17 10:23 UTC (permalink / raw)
  To: Josh Triplett; +Cc: H. Peter Anvin, Linux-Sparse, Linux Kernel Mailing List


> > 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.

> 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. :)

> > 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.
> 
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-17 10:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17  5:27 gcc tickets for sparse attributes H. Peter Anvin
2014-01-17  5:35 ` H. Peter Anvin
2014-01-17  8:33 ` Johannes Berg
2014-01-17  9:22   ` Josh Triplett
2014-01-17 10:23     ` Johannes Berg
2014-01-17  9:18 ` Josh Triplett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.