Re: sys_select

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

 



Erik,

I understand what you are saying. My module will be a product (other pieces
comming from other people in the team), and is not extension to the kernel.
User application provide authentication (lot of maths). My module needs to run
in the kernel. Other point, I will not be able to export sys_select, as this
product will be shipped as a mdule and we will not be able to recompile kernel
on the end user machine.

Usman
--- Erik Mouw <J.A.K.Mouw@ITS.TUDelft.NL> wrote:
> On Tue, Sep 18, 2001 at 07:12:19AM -0700, Usman S. Ansari wrote:
>> My kernel module is talking to user application over a socket. I want to
>> timeout, if for any reason user application is not running. Using sys_select
>> seemed like a good idea (until this, see below). The other idea I had was to
>> use timer and send a sigterm to the thread which is sitting on a
sock_recvmsg
>> call. This works, but there is a race condition, get data over recvmsg,
>> before I remove timer, timer pops up.
>> 
>> What would be a good way, any suggestions ?
> 
> The first question is why your kernel module wants to talk over a socket _at
> all_. This smells like policy in the kernel, while the kernel should only
> provide mechanisms. Most of the time moving the policy to userland makes the
> total design much cleaner.
> 
> Erik
> 
> -- 
> J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
> of Electrical Engineering, Faculty of Information Technology and Systems,
> Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
> Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
> WWW: http://www-ict.its.tudelft.nl/~erik/

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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