diff options
author | jonathan <jonathan@FreeBSD.org> | 2011-06-30 10:56:02 +0000 |
---|---|---|
committer | jonathan <jonathan@FreeBSD.org> | 2011-06-30 10:56:02 +0000 |
commit | 8c932faae446ada0bed49a41fbb164c821227122 (patch) | |
tree | 4124774c8a367f5606513084c5f950e1a12d2ac0 /sys/arm | |
parent | ced9bcf26f7e7107339e61b56b9ba7ceba6049ac (diff) | |
download | FreeBSD-src-8c932faae446ada0bed49a41fbb164c821227122.zip FreeBSD-src-8c932faae446ada0bed49a41fbb164c821227122.tar.gz |
Add some checks to ensure that Capsicum is behaving correctly, and add some
more explicit comments about what's going on and what future maintainers
need to do when e.g. adding a new operation to a sys_machdep.c.
Approved by: mentor(rwatson), re(bz)
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/sys_machdep.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/arm/arm/sys_machdep.c b/sys/arm/arm/sys_machdep.c index 52545d8..4c3e350 100644 --- a/sys/arm/arm/sys_machdep.c +++ b/sys/arm/arm/sys_machdep.c @@ -109,18 +109,20 @@ sysarch(td, uap) #ifdef CAPABILITY_MODE /* - * Whitelist of operations which are safe enough for capability mode. + * When adding new operations, add a new case statement here to + * explicitly indicate whether or not the operation is safe to + * perform in capability mode. */ if (IN_CAPABILITY_MODE(td)) { switch (uap->op) { - case ARM_SYNC_ICACHE: - case ARM_DRAIN_WRITEBUF: - case ARM_SET_TP: - case ARM_GET_TP: - break; - - default: - return (ECAPMODE); + case ARM_SYNC_ICACHE: + case ARM_DRAIN_WRITEBUF: + case ARM_SET_TP: + case ARM_GET_TP: + break; + + default: + return (ECAPMODE); } } #endif |