summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-09-07 14:01:58 +0000
committerkib <kib@FreeBSD.org>2016-09-07 14:01:58 +0000
commit39846b4beaf1727a44b2c98caf8748e4b1a0d7a4 (patch)
tree10d54e3a82a91bf0dfb68bc143e70649d2ba4ed3
parent889d4f798b14219a60729bebb04799ddcdba4071 (diff)
downloadFreeBSD-src-39846b4beaf1727a44b2c98caf8748e4b1a0d7a4.zip
FreeBSD-src-39846b4beaf1727a44b2c98caf8748e4b1a0d7a4.tar.gz
MFC r304279:
By default, allow all to read the HPET registers pages. At the same time, by, by default disallow writes to the mmaped HPET pages.
-rw-r--r--sys/dev/acpica/acpi_hpet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c
index da1e160e..2d4bac8 100644
--- a/sys/dev/acpica/acpi_hpet.c
+++ b/sys/dev/acpica/acpi_hpet.c
@@ -762,14 +762,14 @@ hpet_attach(device_t dev)
mda.mda_devsw = &hpet_cdevsw;
mda.mda_uid = UID_ROOT;
mda.mda_gid = GID_WHEEL;
- mda.mda_mode = 0600;
+ mda.mda_mode = 0644;
mda.mda_si_drv1 = sc;
error = make_dev_s(&mda, &sc->pdev, "hpet%d", device_get_unit(dev));
if (error == 0) {
sc->mmap_allow = 1;
TUNABLE_INT_FETCH("hw.acpi.hpet.mmap_allow",
&sc->mmap_allow);
- sc->mmap_allow_write = 1;
+ sc->mmap_allow_write = 0;
TUNABLE_INT_FETCH("hw.acpi.hpet.mmap_allow_write",
&sc->mmap_allow_write);
SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
OpenPOWER on IntegriCloud