#ifndef _KERNEL_KCSAN_ENCODING_H
#define _KERNEL_KCSAN_ENCODING_H
#include <linux/bits.h>
#include <linux/log2.h>
#include <linux/mm.h>
#include "kcsan.h"
#define SLOT_RANGE …
#define INVALID_WATCHPOINT …
#define CONSUMED_WATCHPOINT …
#define MAX_ENCODABLE_SIZE …
#define WATCHPOINT_SIZE_BITS …
#define WATCHPOINT_ADDR_BITS …
#define WATCHPOINT_WRITE_MASK …
#define WATCHPOINT_SIZE_MASK …
#define WATCHPOINT_ADDR_MASK …
static_assert(…);
static_assert(…);
static inline bool check_encodable(unsigned long addr, size_t size)
{ … }
static inline long
encode_watchpoint(unsigned long addr, size_t size, bool is_write)
{ … }
static __always_inline bool decode_watchpoint(long watchpoint,
unsigned long *addr_masked,
size_t *size,
bool *is_write)
{ … }
static __always_inline int watchpoint_slot(unsigned long addr)
{ … }
static __always_inline bool matching_access(unsigned long addr1, size_t size1,
unsigned long addr2, size_t size2)
{ … }
#endif