Re: Sparse context checking Vs Clang Thread Safety analysis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 22 May 2019, Philipp Reisner wrote:

> Am Mittwoch, 22. Mai 2019, 11:37:40 CEST schrieb Julia Lawall:
> > On Wed, 22 May 2019, Philipp Reisner wrote:
> > > Hi,
> > >
> > > [...]
> > >
> > > I love the whole idea, but gave up working on such a things myself.
> > >
> > > > > Because clang analysis wants it to be global!
> > > >
> > > > A __protected_by() annotation sounds like a good idea.  I don't really
> > > > care about the format too much.  If the information were in a comment
> > > > and we could parse with a perl script that would be fine.  Or we could
> > > >
> > > > do:
> > > > 	struct foo {
> > > >
> > > > 		struct mutex lock;
> > > > 		__start_protected(lock);
> > > > 		int a, b, c;
> > > > 		__end_protected(lock);
> > > >
> > > > 	};
> > >
> > > Regarding the syntax I vote for a __protected_by(lock) instead of
> > > __start_protected(lock) / __end_protected(lock).
> >
> > What do you mean exactly, eg in the above example?
> >
>  	struct foo {
>  		struct mutex lock;
>  		int a __protected_by_(lock);
>               int b __protected_by_(lock);
>          };

OK, thanks.  Might the lock be in another structure (eg struct upperfoo)?
So

int a __protected_by_(upperfoo.lock);

julia



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux