lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47FF658E.2040808@ladisch.de>
Date:	Fri, 11 Apr 2008 15:20:14 +0200
From:	Clemens Ladisch <clemens@...isch.de>
To:	Dimitri Gorokhovik <dimitri.gorokhovik@...com.fr>
CC:	tglx@...utronix.de, linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] HPET: register additional counter-only char device

Dimitri Gorokhovik wrote:
> I need to have many processes all reading from userspace the counter register
> of the (same) HPET hardware. Just reading counter values, not handling timers,
> enabling/disabling interrupts etc. `/dev/hpet' doesn't allow for this, as the
> number of times it can be opened is limited by the number of timers available.

Indeed.  The driver assumes that userspace wants to program its own
timer (like an RTC device).  Allowing mmap() on the hardware counter was
more an afterthought.

> What would be the right way to implement such a support? For now, I simply
> register a new misc device, '/dev/hpetctr', along with '/dev/hpet', for the same
> ACPI device and on the same occasion.

Your patch circumvents CONFIG_HPET_MMAP.

Another possibility would be to allow the device to be opened
infinitely many times but not to allocate a hardware timer until one of
the ioctls is called.  This means that opening /dev/hpet does not
guarantee that a timer is available, but this has already been possible
previously because request_irq() might fail.


Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ