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]
Date:	Wed, 12 Dec 2012 01:45:34 +0100
From:	Benedikt Spranger <b.spranger@...utronix.de>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, hjk@...sjkoch.de,
	Alexander.Frank@...rspaecher.com
Subject: Re: [PATCH 1/2] uio: add warning to documentation

On Tue, 11 Dec 2012 15:18:16 -0800
Greg KH <gregkh@...uxfoundation.org> wrote:

> > -<function>open()</function>, you will probably also want a custom
> > +<function>release()</function>, you will probably also want a
> > custom <function>release()</function> function. 
> That sentance no longer makes sense.
DUH! will fix...

> > +</para><para>CAVE: The release hook may be processed, even if a
> > mmap is aktive.
> Huh?
OK, think about a user of uio_pdrv_genirq and you did your
powermanagement well. The user open the UIO device, do a mmap() and
close the UIO device. Then he access the given pointer and wonders why
the system is stuck. It is a bad idea to disable clocks on release
while a mmap is active.

> > +Disabling clocks or other powermanagement functionality may cause
> > a system +crash, hangup or other unwanted sideeffects.
> > +</para><para><emphasis>The mmap() function shall add an extra
> > reference to the file associated with the file descriptor fildes
> > which is not removed by a subsequent close() on that file
> > descriptor. This reference shall be removed when there are no more
> > mappings to the file.</emphasis></para><para> +<link
> > xlink:href="http://pubs.opengroup.org/onlinepubs/009695399/functions/mmap.html">IEEE
> > Std 1003.1, 2004 Edition, mmap()</link>
> 
> It's not up to us to document the mmap system call here, you should
> know how to use it if you write a program with it, right?
Its not the user of mmap(), it is for the driver programmer. It is a
bad idea to do every kind of powermanagement function in the release
hook.

Regards 
    Bene
--
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