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: <1288679408.2080.18.camel@noppispoppis.nmp.nokia.com>
Date:	Tue, 02 Nov 2010 08:30:08 +0200
From:	Onkalo Samu <samu.p.onkalo@...ia.com>
To:	ext Alan Cox <alan@...ux.intel.com>
Cc:	Ming Lei <tom.leiming@...il.com>,
	"gregkh@...e.de" <gregkh@...e.de>,
	"hmh@....eng.br" <hmh@....eng.br>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] device-core: sysfs open - close notify

On Mon, 2010-11-01 at 18:11 +0100, ext Alan Cox wrote:
> > Your patch may cause many unnecessary memory waste because
> > most of drivers does not need attribute file .open/.close notifier.
> 
> Firstly there are not that many driver objects in a small system so it
> wouldn't take that much to shift the balance the other way. Secondly
> its becoming clear that every time a driver goes to runtime pm these
> issues come up - even with things like configuration values for drivers
> that need to wake the hardware and then silence it.
> 
> So the whole sysfs/open thing is going to keep haunting us with runtime
> pm, the question is where to put the callbacks so we don't bloat stuff.
> Clearly not per attribute or per sysfs node. One possibility would be
> with the runtime pm stuff, but that would need a clean reliable way to
> go sysfs->device->runtime_pm
> 
> There are also obvious hackish ways to handle it like passing a 0
> length read to indicate close etc - they save memory but they are
> asking for problems in future.
> 

Memory footprint could be minimized by combining separate open close
functions to one like sysfs_open_close_notify and the actual operation
would be a call parameter. But is that hackish?

And perhaps some flags could be used to indicate which attributes trigs
the open / close notification.

-Samu

 


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