Skip to content

Commit

Permalink
atomic: Update interceptor function signatures after commit 5e9a82e
Browse files Browse the repository at this point in the history
Fixes:	5e9a82e ("atomics: Constify loads")
  • Loading branch information
markjdb committed Dec 17, 2024
1 parent 56816e6 commit fa5f4c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sys/kern/subr_asan.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ kasan_casueword(volatile u_long *base, u_long oldval, u_long *oldvalp,
}

#define _ASAN_ATOMIC_FUNC_LOAD(name, type) \
type kasan_atomic_load_##name(volatile type *ptr) \
type kasan_atomic_load_##name(const volatile type *ptr) \
{ \
kasan_shadow_check((uintptr_t)ptr, sizeof(type), true, \
__RET_ADDR); \
Expand Down
2 changes: 1 addition & 1 deletion sys/kern/subr_csan.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ kcsan_copyout(const void *kaddr, void *uaddr, size_t len)
}

#define _CSAN_ATOMIC_FUNC_LOAD(name, type) \
type kcsan_atomic_load_##name(volatile type *ptr) \
type kcsan_atomic_load_##name(const volatile type *ptr) \
{ \
kcsan_access((uintptr_t)ptr, sizeof(type), false, true, \
__RET_ADDR); \
Expand Down
2 changes: 1 addition & 1 deletion sys/kern/subr_msan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ kmsan_casueword(volatile u_long *base, u_long oldval, u_long *oldvalp,
}

#define _MSAN_ATOMIC_FUNC_LOAD(name, type) \
type kmsan_atomic_load_##name(volatile type *ptr) \
type kmsan_atomic_load_##name(const volatile type *ptr) \
{ \
kmsan_check_arg(sizeof(ptr), \
"atomic_load_" #name "():args"); \
Expand Down
4 changes: 2 additions & 2 deletions sys/sys/atomic_san.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
type sp##_atomic_readandclear_##name(volatile type *)

#define ATOMIC_SAN_LOAD(sp, name, type) \
type sp##_atomic_load_##name(volatile type *)
type sp##_atomic_load_##name(const volatile type *)

#define ATOMIC_SAN_LOAD_ACQ(sp, name, type) \
type sp##_atomic_load_acq_##name(volatile type *)
type sp##_atomic_load_acq_##name(const volatile type *)

#define ATOMIC_SAN_STORE(sp, name, type) \
void sp##_atomic_store_##name(volatile type *, type)
Expand Down

0 comments on commit fa5f4c1

Please sign in to comment.