Module Name:    src
Committed By:   riastradh
Date:           Sun Jul 10 09:59:22 UTC 2022

Modified Files:
        src/sys/sys: cpuio.h

Log Message:
cpuio.h: Use uint8_t, not bool.

In principle bool can only store two values, 0 and 1, but occupies
eight bits of storage (on all NetBSD platforms to my knowledge),
meaning there are 254 other values which might be trap
representations which would be undefined behaviour to use but which
userland can control the bits of.

To placate ubsan, just use uint8_t here instead of bool.  No bump or
anything because the ABI is the same: one-byte field with one-byte
alignment.

Reported-by: syzbot+3bc3d6837da151448...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/cpuio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to