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] [day] [month] [year] [list]
Date:	Tue, 21 Oct 2008 13:42:42 -0700
From:	"Dan Williams" <dan.j.williams@...el.com>
To:	"Timur Tabi" <timur@...escale.com>
Cc:	linux-kernel@...r.kernel.org,
	"Kumar Gala" <kumar.gala@...escale.com>
Subject: Re: Best method for sending messages to user space?

On Tue, Oct 21, 2008 at 1:23 PM, Timur Tabi <timur@...escale.com> wrote:
> Dan Williams wrote:
>
>> fd = open("/sys/block/md0/md/array_state");
>> do {
>>       read(buf, fd, len);
>>       act_on_message(buf);
>>       select(...); /* wait for next sysfs_notify event */
>>       lseek(fd, 0, SEEK_SET); /* seek back so we can read the new state */
>> } while (1);
>
> I meant from the kernel side.  I added a call to sysfs_notify(), and I didn't
> see any sysfs entries being created, so I presume I need to set up sysfs before
> I call sysfs_notify(), but I can't figure out what that setup is.
>

sysfs_notify() will not create any files it only operates on
pre-existing attributes created via kobject_{init_and_}add().  See:
http://lxr.linux.no/linux+v2.6.27/drivers/md/md.c#L3473
http://lxr.linux.no/linux+v2.6.27/drivers/md/md.c#L3761
--
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