Author: kib
Date: Wed Sep  7 14:01:58 2016
New Revision: 305538
URL: https://svnweb.freebsd.org/changeset/base/305538

Log:
  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.

Modified:
  stable/11/sys/dev/acpica/acpi_hpet.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/acpica/acpi_hpet.c
==============================================================================
--- stable/11/sys/dev/acpica/acpi_hpet.c        Wed Sep  7 13:57:06 2016        
(r305537)
+++ stable/11/sys/dev/acpica/acpi_hpet.c        Wed Sep  7 14:01:58 2016        
(r305538)
@@ -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),
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to