NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/61009: There seems to be a missing NetBSD sysctl equivalent to Linux's "mitigations=full"
>Number: 61009
>Category: kern
>Synopsis: There seems to be a missing NetBSD sysctl equivalent to Linux's "mitigations=full"
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 14 18:40:00 +0000 2026
>Originator: Ellie
>Release: 11.0
>Organization:
>Environment:
NetBSD ruby-b-s-delly 11.0_STABLE NetBSD 11.0_STABLE (GENERIC) #0: Fri Oct 30 19:02:53 UTC 2026 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
There seems to be a missing NetBSD sysctl equivalent to Linux's "mitigations=full", some way for the user to indicate I care more about process isolation than performance. Some single command that should enable all the available fixes.
This page only lists a few scattered individual options: https://wiki.netbsd.org/security/meltdown_spectre/ And some of them don't seem to be enabled by default:
# sysctl -w machdep.spectre_v4.mitigated=1
machdep.spectre_v4.mitigated: 0 -> 1
I was also surprised to not see IBRS mentioned, for me the kernel claims there are no hardware mitigations for this Ryzen 5 5500U:
# sysctl -w machdep.spectre_v2.hwmitigated=1
sysctl: machdep.spectre_v2.hwmitigated: Operation not supported
# sysctl machdep.spectre_v2.hwmitigated
machdep.spectre_v2.hwmitigated = 0
...with the method not mentioning IBRS:
# sysctl machdep.spectre_v2.method
machdep.spectre_v2.method = [GCC retpoline]
I wonder if it shouldn't be using IBRS...? Do I need to do something else to enable that? But I'm not an expert so this could be completely wrong.
Anyway, having a "enable everything available" option would really help. And perhaps also a more central way to list what techniques are being used in total, e.g. like Linux listing them in "lscpu".
>How-To-Repeat:
1. Read https://wiki.netbsd.org/security/meltdown_spectre/
2. Try to find some unified way of 1. enabling all available mitigations with one single command (on Linux: "mitigaitons=full"), and 2. listing all in-use mitigations with one single command (on Linux: "lscpu").
>Fix:
not known
Home |
Main Index |
Thread Index |
Old Index