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-next>] [day] [month] [year] [list]
Message-Id: <1313576222-27743-1-git-send-email-jic23@cam.ac.uk>
Date:	Wed, 17 Aug 2011 11:17:00 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	greg@...ah.com, Jonathan Cameron <jic23@....ac.uk>
Subject: [RFC PATCH 0/2] Sysfs group create for empty groups.

The following is a quick stab at avoiding a hideous work around
we are currently using in IIO.  In some cases we have entire
attribute groups that are created from descriptions an array
of struct iio_chan_spec.  To keep the reference counts sane
and cause subdirectories to be created we are currently using
dummy groups and dummy attribute arrays (provided once in the
core).  This series is an initial probably stupid approach
to avoiding this.

Greg has expressed some doubts about whether subdirectories are
ever a good idea, but the problem occurs for the top level
directory as well (handled by patch 1).

Note, all attributes are created at probe time.  Ultimately we
are just respinning the create_group code to allow us to create
the attributes from a device description rather than statically
allocating them in each driver (results in a massive reduction
in repeated code).

All opinions welcomed.

(this is definitely an rfc, the code isn't even tested yet)

Jonathan

p.s. Greg, sorry for pestering about this!

Jonathan Cameron (2):
  sysfs: Allow for null group pointer in create_group
  sysfs: Allow for groups with no attributes - grp->attrs = NULL.

 fs/sysfs/group.c |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

-- 
1.7.3.4

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