<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/memory-model/Documentation/access-marking.txt, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-07-15T22:44:40Z</updated>
<entry>
<title>Merge tag 'kcsan.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu</title>
<updated>2024-07-15T22:44:40Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2024-07-15T22:44:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4b2b0b1e41e3b5c542a18639cd4f11c9efbb465'/>
<id>urn:sha1:e4b2b0b1e41e3b5c542a18639cd4f11c9efbb465</id>
<content type='text'>
Pull KCSAN updates from Paul McKenney:

 - improve the documentation for the new __data_racy type qualifier
   to the data_race() macro's kernel-doc header and to the LKMM's
   access-marking documentation

 - add missing MODULE_DESCRIPTION

* tag 'kcsan.2024.07.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
  kcsan: Add missing MODULE_DESCRIPTION() macro
  kcsan: Add example to data_race() kerneldoc header
</content>
</entry>
<entry>
<title>tools/memory-model: Add KCSAN LF mentorship session citation</title>
<updated>2024-06-06T18:23:35Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2024-05-29T17:53:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e029b73b7d1d8684e52961a7ecf74770d16651b'/>
<id>urn:sha1:1e029b73b7d1d8684e52961a7ecf74770d16651b</id>
<content type='text'>
Add a citation to Marco's LF mentorship session presentation entitled
"The Kernel Concurrency Sanitizer"

[ paulmck: Apply Marco Elver feedback. ]

Reported-by: Marco Elver &lt;elver@google.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Acked-by: Andrea Parri &lt;parri.andrea@gmail.com&gt;
Reviewed-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Acked-by: Marco Elver &lt;elver@google.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Cc: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jade Alglave &lt;j.alglave@ucl.ac.uk&gt;
Cc: Luc Maranget &lt;luc.maranget@inria.fr&gt;
Cc: Daniel Lustig &lt;dlustig@nvidia.com&gt;
Cc: Joel Fernandes &lt;joel@joelfernandes.org&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>kcsan: Add example to data_race() kerneldoc header</title>
<updated>2024-05-30T22:06:26Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2024-05-10T22:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=020e6c22bd6e67592f38b47d0f1926a831482560'/>
<id>urn:sha1:020e6c22bd6e67592f38b47d0f1926a831482560</id>
<content type='text'>
Although the data_race() kerneldoc header accurately states what it does,
some of the implications and usage patterns are non-obvious.  Therefore,
add a brief locking example and also state how to have KCSAN ignore
accesses while also preventing the compiler from folding, spindling,
or otherwise mutilating the access.

[ paulmck: Apply Bart Van Assche feedback. ]
[ paulmck: Apply feedback from Marco Elver. ]

Reported-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Cc: Marco Elver &lt;elver@google.com&gt;
Cc: Breno Leitao &lt;leitao@debian.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>tools/memory-model: Document data_race(READ_ONCE())</title>
<updated>2021-07-27T18:48:55Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2021-05-18T17:47:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87859a8e3f083bd57b34e6a962544d775a76b15f'/>
<id>urn:sha1:87859a8e3f083bd57b34e6a962544d775a76b15f</id>
<content type='text'>
It is possible to cause KCSAN to ignore marked accesses by applying
__no_kcsan to the function or applying data_race() to the marked accesses.
These approaches allow the developer to restrict compiler optimizations
while also causing KCSAN to ignore diagnostic accesses.

This commit therefore updates the documentation accordingly.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/memory-model: Heuristics using data_race() must handle all values</title>
<updated>2021-07-27T18:48:55Z</updated>
<author>
<name>Manfred Spraul</name>
</author>
<published>2021-05-14T18:40:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f92975d76d537c06a2118f9c3c63432c0f7c7a88'/>
<id>urn:sha1:f92975d76d537c06a2118f9c3c63432c0f7c7a88</id>
<content type='text'>
Data loaded for use by some sorts of heuristics can tolerate the
occasional erroneous value.  In this case the loads may use data_race()
to give the compiler full freedom to optimize while also informing KCSAN
of the intent.  However, for this to work, the heuristic needs to be
able to tolerate any erroneous value that could possibly arise.  This
commit therefore adds a paragraph spelling this out.

Signed-off-by: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/memory-model: Add example for heuristic lockless reads</title>
<updated>2021-07-27T18:47:34Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2021-05-13T21:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=436eef23c41fe10dc34ed19a00caf9f1290a8689'/>
<id>urn:sha1:436eef23c41fe10dc34ed19a00caf9f1290a8689</id>
<content type='text'>
This commit adds example code for heuristic lockless reads, based loosely
on the sem_lock() and sem_unlock() functions.

[ paulmck: Apply Alan Stern and Manfred Spraul feedback. ]

Reported-by: Manfred Spraul &lt;manfred@colorfullife.com&gt;
[ paulmck: Update per Manfred Spraul and Hillf Danton feedback. ]
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/memory-model: Make read_foo_diagnostic() more clearly diagnostic</title>
<updated>2021-07-20T20:52:03Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2021-05-13T18:17:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1846a7fa767fbf8cf42d71daf75d51e30e3c8327'/>
<id>urn:sha1:1846a7fa767fbf8cf42d71daf75d51e30e3c8327</id>
<content type='text'>
The current definition of read_foo_diagnostic() in the "Lock Protection
With Lockless Diagnostic Access" section returns a value, which could
be use for any purpose.  This could mislead people into incorrectly
using data_race() in cases where READ_ONCE() is required.  This commit
therefore makes read_foo_diagnostic() simply print the value read.

Reported-by: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/memory-model: Add access-marking documentation</title>
<updated>2021-03-15T20:59:47Z</updated>
<author>
<name>Paul E. McKenney</name>
</author>
<published>2021-02-11T23:40:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49ab51b01ec6fd837ae3efe2e0cdb41fcf5cf048'/>
<id>urn:sha1:49ab51b01ec6fd837ae3efe2e0cdb41fcf5cf048</id>
<content type='text'>
This commit adapts the "Concurrency bugs should fear the big bad data-race
detector (part 2)" LWN article (https://lwn.net/Articles/816854/)
to kernel-documentation form.  This allows more easily updating the
material as needed.

Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
[ paulmck: Apply Marco Elver feedback. ]
[ paulmck: Update per Akira Yokosawa feedback. ]
Reviewed-by: Marco Elver &lt;elver@google.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
</feed>
