Page MenuHomeFreeBSD

ena: Make first_interrupt a uint8_t
ClosedPublic

Authored by markj on Jun 30 2022, 6:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 20, 11:10 AM
Unknown Object (File)
Sat, Apr 12, 9:52 PM
Unknown Object (File)
Mon, Apr 7, 4:43 AM
Unknown Object (File)
Fri, Mar 28, 9:55 PM
Unknown Object (File)
Mon, Mar 24, 12:43 AM
Unknown Object (File)
Mar 2 2025, 3:36 PM
Unknown Object (File)
Mar 1 2025, 5:23 PM
Unknown Object (File)
Feb 23 2025, 10:58 AM
Subscribers

Details

Summary

Avoid passing vars of type bool to atomic(9) routines. The size of bool
is not fixed by the C standard, even though it's one byte by convention.

This fixes the KASAN and KMSAN builds, which fail because the compiler
refuses to silently cast a _Bool * to a uint8_t * when calling the
atomic(9) interceptors.

Fixes: 0ac122c388d9 ("ena: Use atomic_load/store functions for first_interrupt variable")

Test Plan

build GENERIC-KASAN and GENERIC-KMSAN amd64 kernels

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable