blob: 530ae1bda8e75ea90d19c375047bc19182f72847 [file] [log] [blame]
Marco Elverdfd402a2019-11-14 19:02:54 +01001/* SPDX-License-Identifier: GPL-2.0 */
Marco Elverbd0ccc42021-01-15 18:09:53 +01002/*
3 * Rules for implicitly atomic memory accesses.
4 *
5 * Copyright (C) 2019, Google LLC.
6 */
Marco Elverdfd402a2019-11-14 19:02:54 +01007
8#ifndef _KERNEL_KCSAN_ATOMIC_H
9#define _KERNEL_KCSAN_ATOMIC_H
10
Marco Elver7e766562020-06-16 14:36:24 +020011#include <linux/types.h>
Marco Elverdfd402a2019-11-14 19:02:54 +010012
13/*
Marco Elver44656d32020-02-25 15:32:58 +010014 * Special rules for certain memory where concurrent conflicting accesses are
15 * common, however, the current convention is to not mark them; returns true if
16 * access to @ptr should be considered atomic. Called from slow-path.
Marco Elverdfd402a2019-11-14 19:02:54 +010017 */
Marco Elver44656d32020-02-25 15:32:58 +010018static bool kcsan_is_atomic_special(const volatile void *ptr)
Marco Elverdfd402a2019-11-14 19:02:54 +010019{
Marco Elver7e766562020-06-16 14:36:24 +020020 return false;
Marco Elverdfd402a2019-11-14 19:02:54 +010021}
22
23#endif /* _KERNEL_KCSAN_ATOMIC_H */