Re: set parameter from module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 5/11/06, Christian Boon <c.boon@xxxxxxxxxxxxxxxxxxxx> wrote:
MHD.Tayseer Alquoatli wrote:

>
>
> On 5/11/06, *Christian Boon* <c.boon@xxxxxxxxxxxxxxxxxxxx
> <mailto: c.boon@xxxxxxxxxxxxxxxxxxxx>> wrote:
>
>     Hi,
>
>     i know it is possible with an ioctl to change a value in a kernel
>     module.
>     Is it possible to let a kernel module change a value in user space
>     when
>     some kind of error occurs?
>
>
> this situation is best implemented using sysfs attribute (file)
> but your user space application has to check (read) this file
>
>     so that i dont need to check 'if' an error occured.
>
>
> you are seeking something like a callback function that will be called
> when a certain event occurs .. i don't know a native implementation to
> this feature
> you can check for errors by ioctl, reading from device file, reading
> from sysfs file, implementing a netlink socket .. but in all cases
> your user space application has to make an action (even doing a listen
> or read from a socket)
> please let me know if such a callback exist
> people CMIIW please
> hope this helps
>
But what about  setting a userspace pointer with an ioctl and then use
that pointer with put_user to change a value?
Or isnt that the right way to do it?

Christian.


you'll face a race condition between kernel/user .. and this may lead to lose some events if no synchronization is used between user/kernel .. you may reset a newly set flag
thanks


--
MHD.Tayseer

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux