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: <op.tfogcsaaiudtyh@master>
Date:	Sun, 10 Sep 2006 21:27:53 +0200
From:	"Thomas Maier" <balagi@...tmail.de>
To:	"Greg KH" <greg@...ah.com>
Cc:	linux-kernel@...r.kernel.org,
	"petero2@...ia.com" <petero2@...ia.com>
Subject: Re: [PATCH] pktcdvd: added sysfs interface + bio write queue handling fix

Hello,

Am 09.09.2006, 23:30 Uhr, schrieb Greg KH <greg@...ah.com>:

> Use /sys/class/pktcdvd/ and use struct device instead of struct
> class_device, so I don't have to convert the code later :)

I moved the pktcdvd control files (device add/remove/map)
into /sys/class/pktcdvd/.
I only use "struct class", no need to use struct class_device,
since this /sys/class/pktcdvd represents not a real device.
The real devices are in /sys/block/pktcdvd[0-7] as created
by a "struct gendisk".

I have a little improvement request for the class code:
since the create_class() function has no attributes parameter,
i have to copy+paste the class_create() code into the module,
assign the class attribute array to the struct class and do a
class_register().
Would be nice if class_create() can be passed the class
attribute array...


The file layout is now as follows:

/sys/block/pktcdvd[0-7]/      # device dir created by gendisk
                   packet/     # pktcdvd subdir
                     <files>   # pktcdvd per device files
                     mapped_to # symlink to mapped device in /sys/block

/sys/class/pktcdvd/		# class dir for control files
                  add          # add new device mapping, creates new pktcdvd device
                  remove       # ...
                  device_map
                  packet_buffers

/debugfs/pktcdvd[0-7]/		# per device debugfs dir entry
                  info         # lot of human readable device infos, previous
                               # found in /proc/driver/pktcdvd[0-7]



Suggestions/Alteratives:
* should there be pktcdvd[0-7] subdirs in /sys/class/pktcdvd/ ?
   With content stored in /sys/block/../packet/ ? Or a symlink to it?

* the files in /sys/class/pktcdvd can be moved to /sys/module/pktcdvd/ ?!
   Seems that some modules have control files in their /sys/module directory.

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