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: <15da71430807290538l6f702303hfa57665314c89ff1@mail.gmail.com>
Date:	Tue, 29 Jul 2008 20:38:28 +0800
From:	cpusoft <cpusoft@...il.com>
To:	"Evgeniy Polyakov" <johnpol@....mipt.ru>, netdev@...r.kernel.org
Subject: Re: where change events in epoll_wait(), and who notify an epoll event?

hi:

> On Tue, Jul 29, 2008 at 2:39 PM, Evgeniy Polyakov <johnpol@....mipt.ru> wrote:
> Hi.
>
> On Tue, Jul 29, 2008 at 09:54:35AM +0800, cpusoft (cpusoft@...il.com) wrote:
>> But, i wonder where changes the epi->event.events? and who notify the
>> epoll event ?
>
> Nothing modifies events, only revents are used to specify mask of the
> condition.
>
> When new event is inserted into the epoll system, appropriate
> driver's (attached to the file's private data)->poll() callback is
> invoked. When the last parameter is non-NULL, it specifies essentially
> the wait queue to attach to the private wait queue head of the driver.
> When driver triggers some condition and calls
> wake_up(&private_wait_queue_head),

thanks alot. however, i still  wonder who call the driever's
wake_up(&private_wait_queue_head)?

i find when  ethernet card receive a packet from internet, it will
call net_interupt(), then call net_rx() and call netif_rx(), but i
cannot find it next call what function.
( function  is in : http://lxr.linux.no/linux+v2.6.26/net/core/netpoll.c#L533 )
void netif_rx(){
  np->rx_hook(np, ntohs(uh->source),    (char *)(uh+1),   ulen -
sizeof(struct udphdr));
}
struct netpoll {
    void (*rx_hook)(struct netpoll *, int, char *, int);
};
but i cannot find the (*rx_hook) point to which function? such as
struct netpoll np{
   .rx_hook = ???
}
So, i wonder,
first is it the right way to call wake_up(&private_wait_queue_head)?
and which function is the real (*rx_hook) ?

please help me.
thank u.


> all wait queues attached there are
> processed and callback stored in each one is executed. Callback for
> epoll's wait queue puts given event into the ready list and wakes up
> epoll_wait(), which copies data to userspace.
>
> --
>        Evgeniy Polyakov
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ