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>] [day] [month] [year] [list]
Date:	Tue, 30 Oct 2007 22:23:47 +0300
From:	Andrey Borzenkov <arvidjaar@...l.ru>
To:	linux-kernel@...r.kernel.org
Subject: 2.6.24 - self-destructing sysfs attributes

I realized that in patch for ACPI battery I created perfect example of 
self-destructing sysfs attributes. Basically, on every access to battery 
properties we check battery status. If ACPI reports battery not present, we 
remove sysfs power_supply object. I.e.

-> user space queries e.g. .../PNP0C0A:00/power_supply/BAT1/energy_now
  -> call acpi_battery_update
    -> battery gone
       -> call power_supply_unregister(.../PNP0C0A:00/power_supply)

I remember discussion about this but am not sure what final outcome is. So 
questions

- is it legal in this form?
- what is the proper way to manage such situation?
- if I move (de-)registering of power_supply out of acpi_battery_update, is 
extra locking (refcounting) required to keep attributes alive or sysfs will 
ensure this?

TIA

-andrey

Download attachment "signature.asc " of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ