Re: C provenance semantics proposal

2019-04-25 Thread Peter Sewell
On 25/04/2019, Richard Biener wrote: > On Thu, Apr 25, 2019 at 3:03 PM Peter Sewell > wrote: >> >> On 25/04/2019, Richard Biener wrote: >> > On Wed, Apr 24, 2019 at 11:18 PM Peter Sewell >> > >> > wrote: >> >> >> >> On 24

Re: C provenance semantics proposal

2019-04-25 Thread Peter Sewell
On 25/04/2019, Richard Biener wrote: > On Wed, Apr 24, 2019 at 11:18 PM Peter Sewell > wrote: >> >> On 24/04/2019, Jeff Law wrote: >> > On 4/24/19 4:19 AM, Richard Biener wrote: >> >> On Thu, Apr 18, 2019 at 3:42 PM Jeff Law wrote: >> >&g

Re: C provenance semantics proposal

2019-04-24 Thread Peter Sewell
On 24/04/2019, Jeff Law wrote: > On 4/24/19 4:19 AM, Richard Biener wrote: >> On Thu, Apr 18, 2019 at 3:42 PM Jeff Law wrote: >>> >>> On 4/18/19 6:20 AM, Uecker, Martin wrote: >>>> Am Donnerstag, den 18.04.2019, 11:45 +0100 schrieb Peter Sewell: >>>

Re: C provenance semantics proposal

2019-04-19 Thread Peter Sewell
On 19/04/2019, Jens Gustedt wrote: > Hello Peter, > > On Fri, 19 Apr 2019 10:11:43 +0100 Peter Sewell > wrote: > >> On 19/04/2019, Jakub Jelinek wrote: >> > On Fri, Apr 19, 2019 at 10:19:28AM +0200, Jens Gustedt wrote: >> [...] > >> > That pen

Re: C provenance semantics proposal

2019-04-19 Thread Peter Sewell
On 19/04/2019, Jakub Jelinek wrote: > On Fri, Apr 19, 2019 at 10:19:28AM +0200, Jens Gustedt wrote: >> > OTOH GCC transforms >> > (uintptr_t)&a != (uintptr_t)(&b+1) >> > into &a != &b + 1 (for equality compares) and then >> > doesn't follow this C rule anyways. >> >> Actually our proposal we are d

Re: C provenance semantics proposal

2019-04-18 Thread Peter Sewell
On Thu, 18 Apr 2019 at 14:54, Uecker, Martin wrote: > > Am Donnerstag, den 18.04.2019, 07:42 -0600 schrieb Jeff Law: > > On 4/18/19 6:20 AM, Uecker, Martin wrote: > > > Am Donnerstag, den 18.04.2019, 11:45 +0100 schrieb Peter Sewell: > > > > On Thu, 18

Re: C provenance semantics proposal

2019-04-18 Thread Peter Sewell
On Thu, 18 Apr 2019 at 10:56, Richard Biener wrote: > > On Thu, Apr 18, 2019 at 11:31 AM Richard Biener > wrote: > > > > On Wed, Apr 17, 2019 at 4:12 PM Uecker, Martin > > wrote: > > > > > > Am Mittwoch, den 17.04.2019, 15:34 +0200 schrieb Richard Biener: > > > > On Wed, Apr 17, 2019 at 2:56 PM

Re: C provenance semantics proposal

2019-04-18 Thread Peter Sewell
On Thu, 18 Apr 2019 at 10:32, Richard Biener wrote: > > On Wed, Apr 17, 2019 at 4:12 PM Uecker, Martin > wrote: > > > > Am Mittwoch, den 17.04.2019, 15:34 +0200 schrieb Richard Biener: > > > On Wed, Apr 17, 2019 at 2:56 PM Uecker, Martin > > > wrote: > > > > > > > > Am Mittwoch, den 17.04.2019,

Re: C provenance semantics proposal

2019-04-17 Thread Peter Sewell
On Wed, 17 Apr 2019 at 15:12, Uecker, Martin wrote: > > Am Mittwoch, den 17.04.2019, 15:34 +0200 schrieb Richard Biener: > > On Wed, Apr 17, 2019 at 2:56 PM Uecker, Martin > > wrote: > > > > > > Am Mittwoch, den 17.04.2019, 14:41 +0200 schrieb Richard Biener: > > > > On Wed, Apr 17, 2019 at 1:53

Re: C provenance semantics proposal

2019-04-17 Thread Peter Sewell
On 17/04/2019, Richard Biener wrote: > On Fri, Apr 12, 2019 at 5:31 PM Peter Sewell > wrote: >> >> On Fri, 12 Apr 2019 at 15:51, Jeff Law wrote: >> > >> > On 4/2/19 2:11 AM, Peter Sewell wrote: >> > > Dear all, >> > > >>

Re: C provenance semantics proposal

2019-04-12 Thread Peter Sewell
On Fri, 12 Apr 2019 at 15:51, Jeff Law wrote: > > On 4/2/19 2:11 AM, Peter Sewell wrote: > > Dear all, > > > > continuing the discussion from the 2018 GNU Tools Cauldron, we > > (the WG14 C memory object model study group) now > > have a detailed propo

C provenance semantics proposal

2019-04-02 Thread Peter Sewell
d especially like to know whether it would be feasible to implement - our hope is that it would only require minor changes. It's presented in three documents: N2362 Moving to a provenance-aware memory model for C: proposal for C2x by the memory object model study group. Jens Gustedt, Pete

Re: C as used/implemented in practice: analysis of responses

2015-06-29 Thread Peter Sewell
. >> See documentation. Use the compiler switch -O0 for compiling >> jitterentropy.c." >> #endif >> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/crypto/jitterentropy.c >> >> Documentation: http://www.chronox.de/jent/doc/CPU-Jitte

Re: C as used/implemented in practice: analysis of responses

2015-06-26 Thread Peter Sewell
On 26 June 2015 at 20:27, Joseph Myers wrote: > On Fri, 26 Jun 2015, Peter Sewell wrote: > >> > It's s simple matter of points-to analysis. &foo + anything may be >> > assumed (in practice) to point to something within foo (or just past the >> > end) an

Re: C as used/implemented in practice: analysis of responses

2015-06-26 Thread Peter Sewell
On 26 June 2015 at 18:08, Joseph Myers wrote: > On Fri, 26 Jun 2015, Peter Sewell wrote: > >> **If you calculate an offset between two separately allocated C memory >> objects (e.g. malloc'd regions or global or local variables) by >> pointer subtraction, can you

C as used/implemented in practice: analysis of responses

2015-06-26 Thread Peter Sewell
ther below or by mailing the Cerberus mailing list: cl-cerbe...@lists.cam.ac.uk https://lists.cam.ac.uk/mailman/listinfo/cl-cerberus many thanks, Kayvan Memarian and Peter Sewell (University of Cambridge) What is C in practice? (Cerberus survey): C

Re: Questions about C as used/implemented in practice

2015-05-25 Thread Peter Sewell
a; we have more responses from Clang and OS kernel developers). The survey is here: http://goo.gl/iFhYIr It consists of 15 short questions about the sequential behaviour of C memory and pointers. thanks, Peter On 25 April 2015 at 22:42, Joseph Myers wrote: > On Fri, 17 Apr 2015, Peter Sewe

Re: Questions about C as used/implemented in practice

2015-04-17 Thread Peter Sewell
On 17 April 2015 at 17:03, wrote: > On 04/17/2015 09:01 AM, Peter Sewell wrote: >> >> On 17 April 2015 at 15:19, wrote: >>> >>> >>>> On Apr 17, 2015, at 9:14 AM, Peter Sewell >>>> wrote: >>>> >>>> Dear gc

Re: Questions about C as used/implemented in practice

2015-04-17 Thread Peter Sewell
On 17 April 2015 at 15:19, wrote: > >> On Apr 17, 2015, at 9:14 AM, Peter Sewell wrote: >> >> Dear gcc list, >> >> we are trying to clarify what behaviour of C implementations is >> actually relied upon in modern practice, and what behaviour

Questions about C as used/implemented in practice

2015-04-17 Thread Peter Sewell
ts work on compiler testing (by Zappa Nardelli, Morisset, and Pawan). many thanks, Kayvan Memarian and Peter Sewell

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-05 Thread Peter Sewell
On 5 March 2014 17:15, Torvald Riegel wrote: > On Tue, 2014-03-04 at 22:11 +0000, Peter Sewell wrote: >> On 3 March 2014 20:44, Torvald Riegel wrote: >> > On Sun, 2014-03-02 at 04:05 -0600, Peter Sewell wrote: >> >> On 1 March 2014 08:03, Paul E. McKenney >&

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-04 Thread Peter Sewell
On 3 March 2014 20:44, Torvald Riegel wrote: > On Sun, 2014-03-02 at 04:05 -0600, Peter Sewell wrote: >> On 1 March 2014 08:03, Paul E. McKenney wrote: >> > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: >> >> Hi Paul, >> >> >>

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-02 Thread Peter Sewell
On 2 March 2014 23:20, Paul E. McKenney wrote: > On Sun, Mar 02, 2014 at 04:05:52AM -0600, Peter Sewell wrote: >> On 1 March 2014 08:03, Paul E. McKenney wrote: >> > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: >> >> Hi Paul, >> >&g

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-02 Thread Peter Sewell
On 1 March 2014 08:03, Paul E. McKenney wrote: > On Sat, Mar 01, 2014 at 04:06:34AM -0600, Peter Sewell wrote: >> Hi Paul, >> >> On 28 February 2014 18:50, Paul E. McKenney >> wrote: >> > On Thu, Feb 27, 2014 at 12:53:12PM -0800, Paul E. McKenney wrote: >

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-03-01 Thread Peter Sewell
Hi Paul, On 28 February 2014 18:50, Paul E. McKenney wrote: > On Thu, Feb 27, 2014 at 12:53:12PM -0800, Paul E. McKenney wrote: >> On Thu, Feb 27, 2014 at 11:47:08AM -0800, Linus Torvalds wrote: >> > On Thu, Feb 27, 2014 at 11:06 AM, Paul E. McKenney >> > wrote: >> > > >> > > 3. The compari

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-21 Thread Peter Sewell
On 21 February 2014 19:41, Linus Torvalds wrote: > On Fri, Feb 21, 2014 at 11:16 AM, Linus Torvalds > wrote: >> >> Why would this be any different, especially since it's easy to >> understand both for a human and a compiler? > > Btw, the actual data path may actually be semantically meaningful ev

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 20:43, Torvald Riegel wrote: > On Tue, 2014-02-18 at 12:12 +0000, Peter Sewell wrote: >> Several of you have said that the standard and compiler should not >> permit speculative writes of atomics, or (effectively) that the >> compiler should preserve dep

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 17:16, Paul E. McKenney wrote: > On Tue, Feb 18, 2014 at 08:49:13AM -0800, Linus Torvalds wrote: >> On Tue, Feb 18, 2014 at 7:31 AM, Torvald Riegel wrote: >> > On Mon, 2014-02-17 at 16:05 -0800, Linus Torvalds wrote: >> >> And exactly because I know enough, I would *really* li

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 17:38, Linus Torvalds wrote: > On Tue, Feb 18, 2014 at 4:12 AM, Peter Sewell > wrote: >> >> For example, suppose we have, in one compilation unit: >> >> void f(int ra, int*rb) { >> if (ra==42) >> *rb=42; >>

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
On 18 February 2014 12:53, Peter Zijlstra wrote: > On Tue, Feb 18, 2014 at 12:12:06PM +0000, Peter Sewell wrote: >> Several of you have said that the standard and compiler should not >> permit speculative writes of atomics, or (effectively) that the >> compiler should

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
Hi Paul, On 18 February 2014 14:56, Paul E. McKenney wrote: > On Tue, Feb 18, 2014 at 12:12:06PM +0000, Peter Sewell wrote: >> Several of you have said that the standard and compiler should not >> permit speculative writes of atomics, or (effectively) that the >> com

Re: [RFC][PATCH 0/5] arch: atomic rework

2014-02-18 Thread Peter Sewell
Several of you have said that the standard and compiler should not permit speculative writes of atomics, or (effectively) that the compiler should preserve dependencies. In simple examples it's easy to see what that means, but in general it's not so clear what the language should guarantee, becaus